Sails服务器未启动
我正在尝试使用以下命令来运行我的应用程序:
forever start /var/www/app.js --prod
但是我有这个错误:
To run an app using `node app.js`, you usually need to have a version of `sails` installed in the same directory as your app. To do that, run `npm install sails` Alternatively, if you have sails installed globally (ie you did `npm install -g sails`), you can use `sails lift`. When you run `sails lift`, your app will still use a local `./node_modules/sails` dependency if it exists, but if it doesn't, the app will run with the global sails instead!
Sails已经安装在同一个目录下。 永远是全球安装。
我也testing
node app.js --prod
但同样的错误,这不是因为永远。
我在节点V4.1.1和npm v3.3.4下。 sails lift
工作伟大。
您是否尝试过在全球范围内安装Sails?
cd /var/www forever start app.js --prod
请尝试这种方式,并告诉它是否工作。
终于搞定了! 一些帆依赖没有正确安装,我已经删除了我的项目的所有node_modules文件夹和npm install
再次,现在它的工作。
错误消息不正确。