Update Node.js: Error while updating to stable version

Viewed 56

trying to upadate node version. Renter image description hereunning this sequence of commands.

1.npm cache clean -f

  1. npm install -g n

after running the second command I am getting this error

$ npm install -g n npm ERR! code EBADPLATFORM npm ERR! notsup Unsupported platform for n@9.0.0: wanted {"os":"!win32","arch":"any"} (current: {"os":"win32","arch":"x64"})

npm ERR! notsup Valid OS: !win32

npm ERR! notsup Valid Arch: any

npm ERR! notsup Actual OS: win32

npm ERR! notsup Actual Arch: x64

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\shara\AppData\Roaming\npm-cache_logs\2022-09-10T16_40_44_122Z-debug.log

Help would be greatly appreciated

1 Answers

https://nodejs.org/en/

If you visit this official node.js website, you can download the latest version depending on your operating system. You will be able to successfully upgrade your node version this way

Related