我已按照https://angular.io/guide/quickstart中的说明操作,并使用npm install命令创建了相应的快速入门文件和已安装的依赖项。之后,当我发出 npm start 命令时,我收到以下错误。
npm ERR! Linux 3.13.0-32-generic
npm ERR! argv "node" "/usr/local/bin/npm" "start"
npm ERR! node v0.10.25
npm ERR! npm v3.9.0
npm ERR! code ELIFECYCLE
npm ERR! angular2-quickstart@1.0.0 start: `tsc && concurrently "npm run tsc:w" "npm run lite" `
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the angular2-quickstart@1.0.0 start script 'tsc && concurrently "npm run tsc:w" "npm run lite" '.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular2-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! tsc && concurrently "npm run tsc:w" "npm run lite"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular2-quickstart
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/sobin/AngularTuts/heroappbase/npm-debug.log
答案 0 :(得分:1)
首先,我尝试在命令提示符下运行此命令:
concurrently "npm run tsc:w" "npm run lite"
那很有用。然后,在package.json文件中,我替换了这一行:
"start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
有了这个:
"start": "concurrently \"npm run tsc:w\" \"npm run lite\" ",
此时,npm start
正常工作。希望有所帮助。
答案 1 :(得分:0)