我一直在努力让Angular2快速启动应用程序在Windows系统上运行,但是无法使用" lite-server"。
在我运行应用程序(npm start)后安装依赖项(npm install)后,我收到以下错误
> Error: spawn cmd ENOENT
[1] at exports._errnoException (util.js:1007:11)
[1] at Process.ChildProcess._handle.onexit (internal/child_process.js:182:32 )
[1] at onErrorNT (internal/child_process.js:348:16)
[1] at _combinedTickCallback (internal/process/next_tick.js:74:11)
[1] at process._tickCallback (internal/process/next_tick.js:98:9)
[1]
[1] npm
[1] ERR! Windows_NT 6.1.7601
[1] npm ERR! argv "D:\\Softwares\\node6\\node.exe" "D:\\Softwares\\node6\\node_m odules\\npm\\bin\\npm-cli.js" "run" "lite"
[1] npm ERR! node v6.2.2
[1] npm ERR! npm v3.9.5
[1] npm ERR! code
[1] ELIFECYCLE
[1] npm ERR! angular2-starter@0.9.0 lite: `lite-server`
[1] npm ERR! Exit status 1
[1] npm ERR!
[1] npm ERR! Failed at the angular2-starter@0.9.0 lite script 'lite-server'.
[1] npm ERR! Make sure you have the latest version of node.js and npm installed.
[1] npm ERR! If you do, this is most likely a problem with the angular2-starter package,
[1] npm ERR! not with npm itself.
[1] npm ERR! Tell the author that this fails on your system:
[1] npm ERR! lite-server
[1] npm
[1] ERR! You can get information on how to open an issue for this project with:
[1] npm ERR! npm bugs angular2-starter
[1] npm ERR! Or if that isn't available, you can get their info via:
[1] npm ERR! npm owner ls angular2-starter
[1] npm ERR! There is likely additional logging output above.
[1]
[1] npm ERR! Please include the following file with any support request:
[1] npm ERR! D:\Dev\Angular2-JumpStart\npm-debug.log
[1] npm run lite exited with code 1
如上所述我的节点(v6.2.2)和npm(v3.9.5)。我也尝试过较旧的节点版本,但没有运气。我还在全球安装了lite-server(仅供参考)。
我已经关注并尝试了一些在线建议,但没有一个可行。
奇怪的是这个问题在我的Mac机器上不存在。感谢您的支持:)
答案 0 :(得分:0)
嗯,我自己解决了。我必须用“C:\ Windows \ System32 \”更新我的Path变量。
问题在于错误消息> Error: spawn cmd ENOENT
答案 1 :(得分:0)
我有同样的问题,相同的版本号和所有内容。添加" C:\ Windows \ System32 \"到系统PATH变量修复了问题。我一直想弄清楚这么长时间。