1

angular-cli just quits during installation:

(myapp)vagrant@myapp-local:/vagrant$ 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.
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: 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'

It seems I have 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
asked Nov 11, 2016 at 10:48
2
  • You have installed using sudo so try sudo ng Commented Nov 11, 2016 at 10:54
  • 1
    facing same issue: vagrant@vagrant-ubuntu-trusty-64:~$ sudo npm cache clean vagrant@vagrant-ubuntu-trusty-64:~$ sudo npm uninstall -g angular-cli vagrant@vagrant-ubuntu-trusty-64:~$ sudo npm install -g angular-cli ........ vagrant@vagrant-ubuntu-trusty-64:~$ : sill mapToRegistry uri registry.npmjs.org/selenium-webdriver Commented Nov 11, 2016 at 14:05

2 Answers 2

3

Resolved: So the issue was of memory of vagrant machine I increased it and it worked.

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

At 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
answered Nov 11, 2016 at 13:36
Sign up to request clarification or add additional context in comments.

1 Comment

So it's not just me. Thanks. You probably should use it just as comment to my question, so that I could flag it as important because it's not an answer after all.
0

The problem is that NPM3 is needed. It's not currently mentioned on the readme check this link. Just execute npm install -g npm3 and then use npm3 in place of npm to install or just update npm to the latest version. hope this will work.

Updated

  1. Try to clean cache - npm cache clean,
  2. Uninstall angular-cli - npm uninstall -g angular-cli
  3. Install again npm install -g angular-cli.
  4. Worse case install angualr cli with a -force flag like this - npm install -g -f angular-cli
answered Nov 11, 2016 at 11:00

3 Comments

I think there's no difference between using npm3 command instead of npm if I already have npm=3.10.9 installed as shown in my question. Anyway, I tried to do what you advised and it didn't work.
@DmitryMikhaylov Try to clean cache npm cache clean, uninstall angular-cli npm uninstall -g angular-cli & install again npm install -g angular-cli. Worse case install angualr cli with a -force flag like this npm install -g -f angular-cli
Thanks, but result is the same after I cleaned cache, removed the angular-cli and reinstalled it with -f option

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.