I installed NodeJS, which seems to work fine. Running npm worked fine and I could install packages. Then I ran
npm install serverless -g
which also ran fine. But when I try to run:
serverless
at the windows command prompt, I get an error about the command not being found.
'serverless' is not recognized as an internal or external command,
operable program or batch file.
I've included the answer is below.
Open up a terminal and type npm install -g serverless to install Serverless.
Steps: Since you already know the basics of Serverless Framework, you must have installed the framework. Next, install the package serverless-offline from npm. Add this installed plugin to your serverless project.
The issue for me was that I was missing the following directory in my Windows PATH env variable:
%AppData%\npm
Once I added that, I could run serverless, sls, etc.
This is probably a stupid answer, but might help someone i hope.
I was facing the same problem, even after adding the path. I found that my AppData folder was hidden somehow, making it available fixed the issue for me. (also after making the changes don't forget to open a new CMD :D )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With