无法在Ubuntu上运行angular 2项目

时间:2018-08-01 19:10:54

标签: angular ubuntu npm

我正在尝试在Ubuntu上运行angular 2项目。

我已经安装了nodejs:sudo apt-get install nodejs

安装角度:sudo npm install -g @angular/cli

当我通过sudo npm installnpm run start运行项目时

我得到这个退货:​​

$sudo npm install npm WARN angular-star-rating@4.0.0-beta.3 requires a

peer of css-star-rating@^1.2.4 but none is installed. You must install peer dependencies yourself. 
npm WARN angular2-jwt@0.2.3 requires a peer of @angular/core@^2.0.0||^4.0.0 but none is installed. You must install peer dependencies yourself. 
npm WARN angular2-jwt@0.2.3 requires a peer of @angular/http@^2.0.0||^4.0.0 but none is installed. You must install peer dependencies yourself. 
npm WARN ng2-custom-validation@1.2.4 requires a peer of @angular/core@>=2.0.0 <5.0.0 but none is installed. You must install peer dependencies yourself. 
npm WARN ng2-custom-validation@1.2.4 requires a peer of @angular/forms@>=2.3.1 <5.0.0 but none is installed. You must install peer dependencies yourself.

up to date in 11.88s


   ╭─────────────────────────────────────╮    
   │                                     │    
   │   Update available 5.6.0 → 6.2.0    │    
   │     Run npm i -g npm to update      │    
   │                                     │    
   ╰─────────────────────────────────────╯

$ npm run start

> ng-universal-demo@0.0.0 start /var/www/html/frontend
> ng serve

** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **  
10% building modules 3/3 modules 0 activeKilled                                    
npm ERR! code ELIFECYCLE 
npm ERR! errno 137 
npm ERR! ng-universal-demo@0.0.0 start: `ng serve` 
npm ERR! Exit status 137 
npm ERR!  
npm ERR! Failed at the ng-universal-demo@0.0.0 start script. 
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

它也只是挂在这里:

10% building modules 3/3 modules 0 active

我在做什么错?我正在具有f1-micro(1个vCPU,0.6 GB内存)的Google Cloud Platform Ubuntu VM上运行此程序

请帮助!

0 个答案:

没有答案