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?
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:-
2. Reinstall Dependencies:-
If you've made changes to the Node.js version or other configurations, consider reinstalling the project dependencies:
Also, Crosscheck Your Nodejs environment.