I am using nodejs version 20.10.0, but I am getting error that says you are using node js 15.0.1

1k Views Asked by At

I am trying to build nexjs app, but once I run npm run dev the cmd is giving me the following error

You are using Node.js 15.0.1. For Next.js, Node.js version >= v18.17.0 is required.

actually I am using nodejs v20.10.0

when I run node -v, it shows v20.10.0 I don't know why, can any one help me figure out?

1

There are 1 best solutions below

0
On

Here are a few steps you can take to troubleshoot and resolve this issue:-

1.Clear Node.js Cache:-

Sometimes, caching issues can cause discrepancies. Try clearing the Node.js cache with the following commands:-

> npm cache clean -f

2. Reinstall Dependencies:-

If you've made changes to the Node.js version or other configurations, consider reinstalling the project dependencies:

> rm -rf node_modules npm install

Also, Crosscheck Your Nodejs environment.