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

Cannot install angular-cli (yes, I'm using npm v3) #2311

rwillmer opened this Issue Sep 23, 2016 · 2 comments


None yet
1 participant

rwillmer commented Sep 23, 2016

Please provide us with the following information:

  1. OS? Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)

OSX El Capitan

  1. Versions. Please run ng --version. If there's nothing outputted, please run
    in a Terminal: node --version and paste the result here:

Cannot install ng, so I cannot give you the version.

$ node -v
$ npm -v

  1. Repro steps. Was this an app that wasn't created using the CLI? What change did you
    do on your code? etc.

Starting from scratch. Clean install of node/npm. followed by a npm install --upgrade
Now trying "sudo npm install -g angular-cli"

  1. The log given by the failure. Normally this include a stack trace and some
    more information.

npm ERR! Darwin 15.5.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "angular-cli"
npm ERR! node v4.5.0
npm ERR! npm v3.10.8

npm ERR! uid must be an unsigned int

  1. Mention any other details that might be useful.

Thanks! We'll be in touch soon.


This comment has been minimized.


rwillmer commented Sep 23, 2016

It's an npm problem. If you download the current LTS version of node, it gives you the above versions.

npm v3.10.8 has this bug, npm/npm#13946

So my problem was this:

  • the standard node download gives you npm v2
  • angular-cli needs npm v3
  • upgrading npm gives you v3.10.8, which has this bug
  • and once you're on v3.10.8, you can't downgrade to v3.10.7, because of this bug.

My workaround was this:

  • remove /usr/local/bin/npm
  • reinstall the standard node download to get npm v2
    -$ sudo npm install -g --upgrade npm@v3.10.7, to get the previous version

Will leave this open while I see whether this is a complete fix, but thought I'd post this now, in case it helps someone else.


This comment has been minimized.


rwillmer commented Sep 23, 2016

I needed to uninstall and then reinstall angular-cli, but otherwise, this is now working for me.

@rwillmer rwillmer closed this Sep 23, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment