我正在尝试使用此命令在Visual Studio代码上运行应用程序: " npm start"
但是我收到了这个错误:
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files (x86)\\nodejs\\\\node.exe" "C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
npm ERR! code ELIFECYCLE
npm ERR! angular-quickstart@1.0.0 start: `concurrently "npm run build:watch" "npm run serve"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the angular-quickstart@1.0.0 start script 'concurrently "npm run build:watch" "npm run serve"'.
npm ERR! This is most likely a problem with the angular-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! concurrently "npm run build:watch" "npm run serve"
npm ERR! You can get their info via:
npm ERR! npm owner ls angular-quickstart
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\user\Desktop\angular-tour-of-heroes\npm-debug.log
我做了以下步骤:
并且在第4步失败了。 我该如何解决这个问题?
答案 0 :(得分:0)
如果你想构建新的Angular 2应用,我建议使用Angular Cli代替快速启动。
安装Angular Cli后,创建&启动应用程序很简单,只需3个步骤:
ng new my-app
cd my-app
ng serve
答案 1 :(得分:0)
您需要更新您的Node和NPM版本。
从以下链接:
通过在终端/控制台窗口中运行node -v和npm -v,验证您是否至少运行了node v4.x.x和npm 3.x.x 。 旧版本会产生错误。
根据您控制台的输出,这些是您当前正在运行的版本。
npm ERR! node v0.12.2
npm ERR! npm v2.7.4
答案 2 :(得分:0)