Sails.js - PATH variable - sails command not recognized

Arman Bimatov picture Arman Bimatov · Mar 1, 2014 · Viewed 11.5k times · Source

After I npm installed Sails.js on Windows Server 2008, "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.

Answer

Arman Bimatov picture Arman Bimatov · Mar 1, 2014

I ended up writing a batch file and putting it into system32 folder "c:\Windows\System32\sails.bat" with this one line:

node C:\Users\XXXXXXXX\AppData\Roaming\npm\node_modules\sails\bin\sails.js

Now, sails lift works well.