1

why i use npm to install something, it will have this problem as below

ERROR: npm is known not to run on Node.js v9.2.1 Node.js 9 is supported but the specific version you're running has a bug known to break npm. Please update to at least 9.0.0 to use this version of npm. You can find the latest release of Node.js at https://nodejs.org/

Then i find some solutions at stackoverflow.

npm WARN npm npm does not support Node.js v9.1.0

npm does not support Node.js v9.0.0

Almost every answer suggest to use "npm uninstall -g npm" first.But when i use this command,it will have the same error as above.

My npm version is 6.13.7

My node version is 9.2.

JackieWillen
  • 489
  • 8
  • 21
  • And upgrading your node version is not an option? Because I think that would be the best thing to do otherwise – daanvanham Feb 03 '20 at 07:58
  • 4
    You shouldn't be using Node 9 at all at this point, and if you're not in a position to be confidently upgrading should probably not have been using an odd-numbered, non-LTS version: https://nodejs.org/en/about/releases/ – jonrsharpe Feb 03 '20 at 08:01

1 Answers1

0

Basically node js 9.2... version is compatible with npm version 5.5.1. So I will provide you the following suggestion.

1- if you want to work with node js 9.2 only then i)- uninstall node js 9.2 ii)- uninstall npm iii)- install node js 9.2 iv)- then install npm version 5.5.1 npm install -g npm@5.5.1

2- update node js and npm to the latest version and check your code compatibility with the new version.

To do this 1- install node js latest version 2-npm install -g npm@latest

cool
  • 1
  • 2