incomeger.blogg.se

Install npmjs
Install npmjs









Rm -rf $APPDATA/npm - this will purge the old global npm folder completely. Open your GitBash or Cygwin(I think both GitBash and Cygwin stores the Windows pre-defined Environment Variables and paths in their storage, so this becomes way easy), on any path, and run this one-liner from there: rm -rf $APPDATA/npm npm install -g npm list -g Since I am all about one-liners, let me make this very damn easy for you.

install npmjs

Npm ERR! File exists: C:\Program Files\nodejs\npm.cmd Npm ERR! Refusing to delete C:\Program Files\nodejs\npm.cmd: is outside C:\Program Files\nodejs\node_modules\npm and not a link Npm ERR! File exists: C:\Program Files\nodejs\npx.cmd npm ERR! Refusing to delete C:\Program Files\nodejs\npx.cmd: is outside C:\Program Files\nodejs\node_modules\npm and not a link If you do go and delete or move the files it has listed and you should be able to run npm i -g npm successfully. I find this step especially important if you had errors in Windows about the path or file name being too long. Now you should be able to run npm i -g npm to update/reinstall npm without any warnings. If you get any warnings about the file path or name being too long skip the warnings.

install npmjs

Rename the folder you extracted from the zip to npm

install npmjs

Grab the zip and unzip it to your node_modules folder that you just deleted the npm folder from. You can paste that into a folder's address bar and it will take you there.











Install npmjs