Skip to content

npm install -g angular-cli: Killed #2630

Closed

Description

@BenDevelopment

Please provide us with the following information:

OS?

Ubuntu 16.04

Versions.

node --version: v4.2.6

Repro steps.

Not concerned: just an error while trying to install angular cli.

The log given by the failure.

ben@myserver:/projects/myproject/frontend/staging$ sudo npm install -g angular-cli
npm WARN deprecated graceful-fs@1.2.3: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
loadDep:node-pre-gyp → ad ▄ ╢██████████████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
Killed

Mention any other details that might be useful.

I've tried to run the command many times (with and without sudo), I always get this message during installtion: Killed.
After this message, the installation exits.

I've installed nodejs and npm this way:

sudo apt-get install nodejs
sudo apt-get install nodejs-legacy
sudo apt-get install npm

Thanks! We'll be in touch soon.

Activity

  1. BenDevelopment commented on Oct 10, 2016

    @BenDevelopment
    Author

    Ok according to this issue #1192, it's because angular cli need at least 1GB Ram. I only have 512.

  2. filipesilva commented on Oct 10, 2016

    @filipesilva
    Contributor

    We do have a very big dependency tree now, yes (#1263). That causes some machines to have problems with npm install. There isn't much I can do to help now :/

  3. khaidinh commented on Apr 28, 2017

    @khaidinh

    Ran into this issue as well and came across this solution. I followed the DigitalOcean guide for adding swap instead though.

  4. DMW007 commented on Oct 22, 2017

    @DMW007

    I ran into this issue on my Raspberry Pi 3 with 1 GB RAM. Don't know how Angular-CLI install the npm packages, but for me the following worked: Create your Angular app without installing all the packages using --skip-install switch like ng new client --skip-install. Then go to the directory (here with cd client) and run npm install.

    This is going to take a while on my RPI3 and result in memory peaks of about 800 MB and also the 100MB swap are full. So there shouldn't be to much running apps on it. But using this methods, it seems that all dependencies were installed:

    root@1ce293b0533c:/app/client# npm install
    npm WARN prefer global node-gyp@3.6.2 should be installed with -g
    
    > node-sass@4.5.3 install /app/client/node_modules/node-sass
    > node scripts/install.js
    

    Now it serves successfully using ng serve (note that --public-host fixes this issue where we get a Invalid host header error in the browser)

    root@1ce293b0533c:/app/client# ng serve --host=0.0.0.0 --port=3000 --public-host=http://pi3
    ** NG Live Development Server is listening on 0.0.0.0:3000, open your browser on http://localhost:3000/ **
     94% asset optimizationwebpack: wait until bundle finished: /                                                                                                  Date: 2017-10-22T09:35:45.942Z
    Hash: f258b747399558a50cdf
    Time: 69959ms
    chunk {inline} inline.bundle.js, inline.bundle.js.map (inline) 5.83 kB [entry] [rendered]
    chunk {main} main.bundle.js, main.bundle.js.map (main) 8.62 kB {vendor} [initial] [rendered]
    chunk {polyfills} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 199 kB {inline} [initial] [rendered]
    chunk {styles} styles.bundle.js, styles.bundle.js.map (styles) 11.3 kB {inline} [initial] [rendered]
    chunk {vendor} vendor.bundle.js, vendor.bundle.js.map (vendor) 2.32 MB [initial] [rendered]
    
    webpack: Compiled successfully.
    
  5. angular-automatic-lock-bot commented on Sep 7, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  6. locked and limited conversation to collaborators on Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions