代码之家  ›  专栏  ›  技术社区  ›  user979331

无法在Ubuntu上运行angular 2项目

  •  1
  • user979331  · 技术社区  · 6 年前

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

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

    sudo npm install npm 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
    

    我做错什么了?我在Google云平台上运行这个带有f1 micro的Ubuntu VM(1 vCPU,0.6gb内存)

    请帮帮我!

    0 回复  |  直到 6 年前