x)- [x] bug report -> please search issues before submitting
- [ ] feature request
@angular/cli: 1.0.0
node: 7.8.0
os: linux x64
Install angular-cli globally with old version of npm. Upgrade npm to new version. You can no longer uninstall the previously installed angular-cli as the global install path changed from /usr/local/lib/node_modules to /usr/lib/node_modules. This old install will act as poison and prevent you from upgrading to 1.0.0.
Update upgrade guide to account for older versions of npm.
I was able to remove poison with:
$ sudo rm -rf /usr/local/lib/node_modules/@angular
$ sudo rm /usr/local/bin/ng
And then reinstalling with npm.
The issue is not in Angular CLI, the issue is that your npm path changed because of the upgrade.
@beeman No, the issue is indeed with Angular CLI, specifically the Upgrade Guide
From the Upgrade Guide:
Angular CLI can now be found on NPM under @angular/cli instead of angular-cli, and has a minimum requirement of Node 6.9.0 or higher, together with NPM 3 or higher.
Ok, so step one is to update Node and NPM if they are out of date.
I did so.
Oops, now there's a poisoned angular-cli in my system that I can never get rid of thanks to your guide!
Guide needs to be fixed so that:
@filipesilva could you comment on this? This is a user error but @RPGillespie6 is right that our guide could be better. It also seems to be OSX specific in this particular case.
I know some npm/node updates can cause havoc with install folders, but am not sure of the specific versions. Where you using NVM as well?
Regardless, if this can happen and we can mitigate it with a simple change to the upgrade steps we should do it.
@RPGillespie6 would you be interested in submitting a PR to the readme noting that one should uninstall the old CLI before updating node/npm?
A recommendation to use nvm might be a good idea. It should have handled this upgrade situation as well as provide the option to move over all global packages
@filipesilva Yes, I can do that. I'll see if I have some time later to day to create a PR
Also @hansl I am running Xubuntu 16.10, not OSX
@RPGillespie6 my bad, I missed that and just looked at the paths.
@filipesilva It looks like the Update Guide is a part of the wiki which I can't submit a PR for. I can make a note in the README, like you said, but it seems out of place to have some upgrade instuctions in the README, while the majority of others are in the Wiki
@RPGillespie6 the file for the wiki is located here: https://github.com/angular/angular-cli/blob/master/docs/documentation/stories/1.0-update.md
There is a script that the team will run to move the docs over to the wiki after your PR is accepted.
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._
Most helpful comment
@beeman No, the issue is indeed with Angular CLI, specifically the Upgrade Guide
From the Upgrade Guide:
Ok, so step one is to update Node and NPM if they are out of date.
I did so.
Oops, now there's a poisoned angular-cli in my system that I can never get rid of thanks to your guide!
Guide needs to be fixed so that: