Search code examples
node.jsnpmnpm-installnvm

npm v9.5.1 is known not to run on Node.js v18.16.0


I am using nvm to manage my Node.js versions. Recently, I installed Node.js version 18.16.0 using nvm, but when I try to use npm, I get the following error message:

npm v9.5.1 is known not to run on Node.js v18.16.0

I've searched for solutions online, but most of them seem to be related to installing a different version of Node.js. I'd like to stick with Node.js v18.16.0 if possible, since it's the version that works best with my project.

I have tried uninstalling and reinstalling Node.js and npm using nvm, but I still get the same error message.

Does anyone have any idea why I am getting this error message, and how I can resolve it?


Solution

  • This phenomenon is not a node problem.

    It's an nvm version issue.

    If you reinstall node 18.16.0 after updating nvm to the latest version, it works normally.