Cannot install angular-cli

angular-cli just shuts down during installation:

 (myapp) vagrant@myapp-local :/vagrant$ 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. npm WARN deprecated minimatch@2.0.10 : Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue npm WARN deprecated lodash-node@2.4.1 : This package is discontinued. Use lodash@ ^4.0.0. (myapp) vagrant@myapp-local :/vagrant$ l mapToRegistry uri https://registry.npmjs.org/serve-static (myapp) vagrant@myapp-local :/vagrant$ ng The program 'ng' is currently not installed. To run 'ng' please ask your administrator to install the package 'ng-common' 

I seem to have the latest versions of both node and npm:

 (myapp) vagrant@myapp-local :/vagrant$ npm -v 3.10.9 (myapp) vagrant@myapp-local :/vagrant$ node -v v6.9.1 
+1
source share
2 answers

Solved: so the problem was in the memory of a roaming car, I increased it, and it worked.

 config.vm.provider "virtualbox" do |vb| vb.memory = "2048" end 

In the last step I had to do:

 sudo ln -s /home/vagrant/node-v6.9.1-linux-x64/lib/node_modules/angular-cli/bin/ng /usr/bin/ng 
+3
source

The problem is that NPM3 is needed. Not currently listed in readme, check out this link. Just do npm install -g npm3 and then use npm3 instead of npm to install or just upgrade npm to the latest version. hope it works.

Update

  • Try clearing the cache - npm cache clean ,
  • Remove angular-cli - npm uninstall -g angular-cli
  • Install npm install -g angular-cli .
  • Worse angualr cli install angualr cli with the -force flag like this - npm install -g -f angular-cli
0
source

All Articles