Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

npm install -g angular-cli: Killed #2630

Closed
BenDevelopment opened this issue Oct 10, 2016 · 5 comments
Closed

npm install -g angular-cli: Killed #2630

BenDevelopment opened this issue Oct 10, 2016 · 5 comments

Comments

@BenDevelopment
Copy link

BenDevelopment commented Oct 10, 2016

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 [email protected]: 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.

@BenDevelopment
Copy link
Author

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

@filipesilva
Copy link
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 :/

@khaidinh
Copy link

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

@DMW007
Copy link

DMW007 commented Oct 22, 2017

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 [email protected] should be installed with -g

> [email protected] 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.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants