felixrieseberg/npm-windows-upgrade

Automate "Cleaning" of an attempted upgrade

Open

#69 opened on Apr 2, 2016

 (0 comments) (1 reaction) (0 assignees)JavaScript (145 forks)github user discovery
enhancementhelp wanted

Repository metrics

Stars
 (2,509 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

@robertbaker wrote a great summary of what's required after someone attempted to upgrade npm with npm install npm or npm upgrade npm. We should offer an automation of the cleanup steps, probably using PowerShell, executed from the script npm-windows-upgrade --fix-attempted-upgrade.

The steps:

Uninstall nodejs, not repair!, UNINSTALL.
Go into %programfiles%\nodejs and delete the entire folder.
Delete %appdata%\npm and %appdata%\npm-cache
Edit your PATH and remove everything that references npm (either program files or appdata).

At this point you should have a blank slate. No node packages, no node in your path, nothing.

So then install the latest node from nodejs.org.

Then in powershell as an admin run npm i -g npm-windows-upgrade
then run npm-windows-upgrade
then update to latest npm.

Contributor guide