2017-05-31 64 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命令不起作用。如果您遇到同样的问题,即使暂时解决编译器错误,然后尝试运行该项目。