felixrieseberg/npm-windows-upgrade

Automate "Cleaning" of an attempted upgrade

Aberta

#69 aberto em 2 de abr. de 2016

 (0 comentário) (1 reação) (0 responsável)JavaScript (145 forks)github user discovery
enhancementhelp wanted

Métricas do repositório

Stars
 (2.509 estrelas)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 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.

Guia do colaborador