2017-05-31 62 views
-1

我試着在我的ubuntu機器上運行我的angular 2項目並得到這個錯誤。奇怪的是,5分鐘前它工作正常。在兩者之間,我跑了另一個ionic2項目,現在有角度的是給出以下錯誤。昨天,另一個角度2的項目也發生了類似的事情。我確實有最新版本的節點和npm。angular2項目將無法運行

npm ERR! Linux 3.16.0-77-generic 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build" 
npm ERR! node v7.10.0 
npm ERR! npm v4.2.0 
npm ERR! code ELIFECYCLE 
npm ERR! errno 2 
npm ERR! [email protected] build: `tsc -p src/` 
npm ERR! Exit status 2 
npm ERR! 
npm ERR! Failed at the [email protected] build script 'tsc -p src/'. 
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 angular-quickstart package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  tsc -p src/ 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs angular-quickstart 
npm ERR! Or if that isn't available, 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!  /home/user6/.npm/_logs/2017-05-31T08_12_03_705Z-debug.log 

npm ERR! Linux 3.16.0-77-generic 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" 
npm ERR! node v7.10.0 
npm ERR! npm v4.2.0 
npm ERR! code ELIFECYCLE 
npm ERR! errno 2 
npm ERR! [email protected] prestart: `npm run build` 
npm ERR! Exit status 2 
npm ERR! 
npm ERR! Failed at the [email protected] prestart script 'npm run build'. 
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 angular-quickstart package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  npm run build 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs angular-quickstart 
npm ERR! Or if that isn't available, 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!  /home/user6/.npm/_logs/2017-05-31T08_12_03_740Z-debug.log 
+0

你是否更新過任何東西,比如'npm','typecript'和目前使用的版本? –

回答

0

問題是在項目中有幾個編譯錯誤。由於npm start命令不起作用。如果您遇到同樣的問題,即使暫時解決編譯器錯誤,然後嘗試運行該項目。