Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 175 Vote(s) - 3.54 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I update npm on Windows?

#1
I tried [this][1]:

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

...but it didn't work.

How do I do this on Windows?

[1]:

[To see links please register here]

Reply

#2
You can use [Chocolatey][1] which is a package manager for windows (like apt-get for Debian Linux).

Install fresh (you might need to uninstall previously installed versions)

> choco install nodejs

Update to the latest version

> choco update nodejs

and for npm

> choco update npm

[1]:

[To see links please register here]

Reply

#3
To update NPM, this worked for me:



* Navigate in your shell to your node installation directory, eg `C:\Program Files (x86)\nodejs`
* run `npm install npm` (no `-g` option)
Reply

#4
This works fine for me to update npm on Windows 7 x64:

- Windows start
- All Programs
- Node.js
- Node.js command prompt (alternative click)
- Run as administrator

`$ npm -g install npm`

- remove `C:\Program Files\nodejs\npm.cmd` the new npm will be at `C:\Users\username\appdata\roaming\npm\npm.cmd`

Hope this helps.
Reply

#5
You can use these commands:

npm cache clean
npm update -g [package....]

If you are upgrading from a previous version of node, then you will want to update all existing global packages.
You can also specify the package name to be updated.
Reply

#6
[Download](

[To see links please register here]

) and run the latest MSI. The MSI will update your installed node and npm.
Reply

#7
This is what worked for me.

1. Open a local folder other than the one in which nodejs is installed.
2. Install npm in that folder with command `npm install npm`
3. Navigate to the folder containing node js. (C:\Program Files\nodejs\node_modules)
4. Delete the npm folder and replace it with the npm and bin folders in the local folder.
5. Run `npm -v`. Now you would get updated version for npm.

Note: I tried installing npm directly in "C:\Program Files\nodejs\node_modules" but it created errors.

Reply

#8
This might help someone. Neither "npm-windows-upgrade" nor the installer alone did it for me. Powershell was still using an older version of node and npm.

So this is what I did (worked for me):
1. Download the latest installer from nodejs.org. Install node. It will update your node; everywhere (Powershell, cmd etc.).
2. Install the npm-windows-upgrade package (npm install -g npm-windows-upgrade) and run npm-windows-upgrade.

I didn't uninstall anything and didn't set any paths.
Reply

#9
This works fine for me

1. >Run **Command Prompt** as **Administrator**
2. Navigate to the folder containing nodejs (eg. C:\Program Files\nodejs)
3. >Run ***Powershell -ExecutionPolicy Unrestricted***
4. >Run ***npm-windows-upgrade***
5. This will show list of versions available to install. Just select your desired version by moving up/down key & Press Enter. <br>
<br>
This'll update your ***npm***
6. To check the current version of npm
>Run ***npm --version***

[Command Prompt Screenshot][1]


[1]:
Reply

#10
1. Start
2. Search for windows powershell
3. Right click and run as administrator
4. Type: where.exe node (returns the path of node.exe in your system. Copy this)
5. wget

[To see links please register here]

-OutFile 'PATH-OF-NODE.EXE_WHICH_YOU_COPIED_JUST_NOW'
6. To check if it has worked, go to your Git bash/Normal command prompt and type: node -v
7. Here you can find the current version of node:

[To see links please register here]


Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through