当我尝试运行npm start

时间:2018-10-03 09:29:55

标签: angular

当我运行以下命令时:

ubuntu@ubunt_server:~/cost/Angular/ang/quickstart$ npm start
angular-quickstart@1.0.0 prestart /home/ubuntu/cost/Angular/ang/quickstart
npm run build
angular-quickstart@1.0.0 build /home/ubuntu/cost/Angular/ang/quickstart
tsc -p src/

我收到以下错误:

npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! angular-quickstart@1.0.0 build: `tsc -p src/`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the angular-quickstart@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional log                                                                                                                                                             ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2018-10-03T09_24_51_022Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! angular-quickstart@1.0.0 prestart: `npm run build`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the angular-quickstart@1.0.0 prestart script.
npm ERR! This is probably not a problem with npm. There is likely additional log                                                                                                                                                             ging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2018-10-03T09_24_51_063Z-debug.log

如何解决此问题?

2 个答案:

答案 0 :(得分:0)

npm cache clean --force 

 npm cache clean

在上方运行后,删除 node_modules 文件夹。现在,通过运行以下代码

再次安装依赖项
 npm install

答案 1 :(得分:0)

/home/ubuntu/.npm/_logs/2018-10-03T09_24_51_063Z-debug.log中有什么?

相关问题