Incompatible node version
Answered
Mucuchies posted this in #help-forum
MucuchiesOP
I'm trying to run
I don't even have 17.7.2 version. When i do
Also
But somehow when I do
npm run dev and its showing You are using Node.js 17.7.2. For Next.js, Node.js version >= v18.17.0 is required. I don't even have 17.7.2 version. When i do
node -v it shows 20.9.0vAlso
nvm list only shows 1 version which is 20.9.0 .But somehow when I do
npx next info. It shows I'm using 17.7.2Answered by Mucuchies
🤧Finally figured it out, configured my environment variables- deleted all the node and nvm folder from root directory. Restarted my pc bajillion times.
@Ray Thanks messi you the goat fr. It was the PATH issue that was causing problems.
@James Thanks for
@Ray Thanks messi you the goat fr. It was the PATH issue that was causing problems.
@James Thanks for
npx node --version commmand41 Replies
Crazy ant
maybe try to remove node_modules and install dependencies again
MucuchiesOP
not working ðŸ˜
@Crazy ant
Crazy ant
i cant reproduce the issue, please wait for others to find the solution if they able to know what could be the issue
MucuchiesOP
ðŸ‘ï¸ ðŸ‘„ ðŸ‘ï¸
Asian paper wasp
May be removing .next/?
I don't have any confidence on it though, this is very environment specific issue it seems
@Asian paper wasp May be removing .next/?
MucuchiesOP
what
im new ðŸ˜
Next created a
.next directly, sometime it's useful to delete it to run freshDoes
npx node --version show 17 or 20@James Does `npx node --version` show 17 or 20
MucuchiesOP
20
MucuchiesOP
Now what
@James Does `npx node --version` show 17 or 20
MucuchiesOP
when i do npx node --version its showing 17.7.2
Your
PATH is probably messed up and it's resolving an old version of node that wasn't installed with nvm@James Your `PATH` is probably messed up and it's resolving an old version of node that wasn't installed with nvm
MucuchiesOP
yea figured it out. what to do now tho
@Mucuchies yea figured it out. what to do now tho
Is your issue resolved, or should I help
MucuchiesOP
Sure
The easiest solution is to install it from https://nodejs.org/en/download . It'll auto update
the installer will update it*
MucuchiesOP
I already did it 🤦, the error is still there
on windows?
@Mucuchies I already did it 🤦, the error is still there
did you restart terminal or your system
MucuchiesOP
Yes
Restarted my pc
Then you can uninstall it completely then, and then reinstall
@Mucuchies Yes
open cmd > type echo %Path%
and paste here
MucuchiesOP
echo %Path%?
yes
yes
MucuchiesOP
I just closed my pc tho 😠I'll take a look tomorrow. It was frustrating
I was this close 👌from punching the screen
@Mucuchies I just closed my pc tho 😠I'll take a look tomorrow. It was frustrating
Alright, when you get active In the meantime, you can try to completely uninstall nodejs, from storage, and then check the version.
If that doesn't work, you'll have to do the steps which ray told you to do i.e. fix %path%
If that doesn't work, you'll have to do the steps which ray told you to do i.e. fix %path%
MucuchiesOP
🙂ðŸ‘
@Mucuchies 🙂ðŸ‘
once you run the command, you will see a list of path. if you see something related to node.
go remove the path by
1. windows key + R > sysdm.cpl > Advanced > Enviroment Variables
2. look for path and double click it
3. remove the path
go remove the path by
1. windows key + R > sysdm.cpl > Advanced > Enviroment Variables
2. look for path and double click it
3. remove the path
ive had the same issue on linux
i had installed diffrent node versions on my user and on root that was cousing problems
MucuchiesOP
🤧Finally figured it out, configured my environment variables- deleted all the node and nvm folder from root directory. Restarted my pc bajillion times.
@Ray Thanks messi you the goat fr. It was the PATH issue that was causing problems.
@James Thanks for
@Ray Thanks messi you the goat fr. It was the PATH issue that was causing problems.
@James Thanks for
npx node --version commmandAnswer
MucuchiesOP
Thanks to me for not kicking the shit out of my sister when she asked "why you always on your laptop"🤡