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

Can't uninstall angular-cli #5842

Closed
RPGillespie6 opened this issue Apr 5, 2017 · 11 comments · Fixed by #5876
Closed

Can't uninstall angular-cli #5842

RPGillespie6 opened this issue Apr 5, 2017 · 11 comments · Fixed by #5876
Labels
area: docs Related to the documentation P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful

Comments

@RPGillespie6
Copy link
Contributor

RPGillespie6 commented Apr 5, 2017

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

Versions.

@angular/cli: 1.0.0
node: 7.8.0
os: linux x64

Repro steps.

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.

The log given by the failure.

Desired functionality.

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.

Mention any other details that might be useful.

@beeman
Copy link
Contributor

beeman commented Apr 5, 2017

The issue is not in Angular CLI, the issue is that your npm path changed because of the upgrade.

@hansl hansl closed this as completed Apr 5, 2017
@RPGillespie6
Copy link
Contributor Author

RPGillespie6 commented Apr 5, 2017

@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:

  1. Uninstalling angular-cli step happens before upgrading node or npm
  2. Upgrade node or npm if necessary
  3. Install latest angular-cli

@hansl
Copy link
Contributor

hansl commented Apr 5, 2017

@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.

@filipesilva
Copy link
Contributor

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.

@filipesilva filipesilva reopened this Apr 5, 2017
@filipesilva filipesilva added area: docs Related to the documentation P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful labels Apr 5, 2017
@filipesilva
Copy link
Contributor

@RPGillespie6 would you be interested in submitting a PR to the readme noting that one should uninstall the old CLI before updating node/npm?

@clydin
Copy link
Member

clydin commented Apr 5, 2017

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

@RPGillespie6
Copy link
Contributor Author

RPGillespie6 commented Apr 5, 2017

@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

@hansl
Copy link
Contributor

hansl commented Apr 5, 2017

@RPGillespie6 my bad, I missed that and just looked at the paths.

@RPGillespie6
Copy link
Contributor Author

RPGillespie6 commented Apr 6, 2017

@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

@delasteve
Copy link
Contributor

@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.

filipesilva pushed a commit that referenced this issue May 4, 2017
Added a few extra details on how to remove residual versions of Angular CLI and reorganized upgrade steps.

Fixes #5842
dond2clouds pushed a commit to d2clouds/speedray-cli that referenced this issue Apr 23, 2018
Added a few extra details on how to remove residual versions of Angular CLI and reorganized upgrade steps.

Fixes angular#5842
@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 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: docs Related to the documentation P1 Impacts a large percentage of users; if a workaround exists it is partial or overly painful
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants