'npm start' 错误

Error with 'npm start'

我在 Ubuntu 上使用 Node v4.2.6 和 npm v3.5.2,我从 github 克隆我的项目并安装所有模块。当我执行 npm start 时它 运行 很好,但是当我尝试 运行 它再次开始崩溃并且我发现让它再次工作的唯一方法是重新克隆项目。 我认为这是一个罕见的虚拟问题,有人可以帮助我吗?请原谅我的英语不好,这是 npm-debug.log 错误:

17 error Linux 4.4.0-92-generic

18 error argv "/usr/bin/nodejs" "/usr/bin/npm" "run" "lite"

19 error node v4.2.6

20 error npm v3.5.2

21 error code ELIFECYCLE

22 error firstApp-client@1.0.0 lite: lite-server

22 error Exit status 1

23 error Failed at the firstApp-client@1.0.0 lite script 'lite-server'.

23 error Make sure you have the latest version of node.js and npm installed.

23 error If you do, this is most likely a problem with the firstApp-client package,

23 error not with npm itself.

23 error Tell the author that this fails on your system:

23 error lite-server

23 error You can get information on how to open an issue for this project with:

23 error npm bugs firstApp-client

23 error Or if that isn't available, you can get their info via:

23 error npm owner ls firstApp-client

23 error There is likely additional logging output above.

24 verbose exit [ 1, true ]

不知道为什么,好像是nodejs版本不兼容的问题。 我运行:

$ sudo npm cache clean -f

$ sudo npm install -g n

$ sudo n stable

$ sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/bin/nodejs

一切都解决了。感谢评论