node C:\Users\XXXXXXXX\AppData\Roaming\npm\node_modules\sails\bin\sails.js module.js:473 throw err;

Viewed 667

After I npm installed Sails.js on Windows 10, "sails" command is not recognized.

Can someone give me a hint on what values to use in the PATH variable? As I understand it is Node.exe that runs the sails.js file. But if I try tunning "node sails.js" command in cmd, it recognizes it, but can't find some of the dependencies.

On my Windows 7 machine everything installed and is running like a charm

1 Answers

I am not sure how you installed sails, but as I do not have enough reputation to post a comment I am writing this as an answer.

So did you install sails globally? Which command you used while installing sails

npm -g install sails

OR

npm install sails 

You should use

npm -g install sails 

Edit

Could you follow the below steps in command prompt with administrator rights.

npm cache clear

Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
npm install -g npm-windows-upgrade
npm-windows-upgrade

npm -g install sails

Let me know if you still face the issue.

Related