Home > Mobile >  Error npm is known not to run on Node.js v10.24.1 and how to fix it, don't update to the latest
Error npm is known not to run on Node.js v10.24.1 and how to fix it, don't update to the latest

Time:04-22

I run : npm run dev

Error : npm is known not to run on Node.js v10.24.1

I have researched and know the command: npm install -g npm@latest and some other commands to fix the problem

But the problem is that my project is using nodejs 10 so it can't use the latest nodejs. So is there any way to fix the above error. Thank you

UPDATE : I use nvm to install and manage versions of nodejs. And my OS is macOs

CodePudding user response:

I happen to work on a project that builds on node 10 as well.

More details would have been helpful to understand the problem better but I suspect it's a compatibility issue.

Try these:

  • Download and install the latest version of nodejs.
  • Open you terminal and verify you have the latest version using node -v. Verify your npm version too using npm -v.
  • Since you have nvm installed, run nvm install 10, then nvm use 10.
  • Verify your versions again. In my case, node is v10.24.1 & npm is 6.14.12.
  • Start your app using npm run dev. Please check you package.json to be sure you are using the right startup command.

CodePudding user response:

Thanks @Oduola Olumide Sunday for the response. I have followed your way but still not solved the problem.

And I fix it by removing the latest nodejs version and using the normal node v10.24.1

enter link description here -> I removed the latest nodejs version with this

  • Related