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

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

Closed
rwillmer opened this issue Sep 23, 2016 · 3 comments
Closed

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

rwillmer opened this issue Sep 23, 2016 · 3 comments

Comments

@rwillmer
Copy link
Contributor

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
v4.5.0
$ npm -v
3.10.8

  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.

@rwillmer
Copy link
Contributor Author

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.

@rwillmer
Copy link
Contributor Author

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

@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 6, 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

1 participant