Next.js server doesn't start
Answered
Vintagix posted this in #help-forum
VintagixOP
I'm currently trying to setup a Next.js project but when I run the
npm run dev to start the server, it tells me that i'm using an outdated version of node.js but, as you can see on the screenshot after trying to start the server, i'm using the node.js v22.5.1, anyone have a clue on how to solve this? (I don't even have the version they're telling me i'm using installed on my computer)Answered by Sun bear
Installing the pnpm with the following command:
corepack enable pnpm37 Replies
VintagixOP
Note that I already tried to reinstall node.js, still the same error :/ (please ping me)
VintagixOP
up ^
Sun bear
how did you install node?
@Vintagix
VintagixOP
through the official website i believe?
Sun bear
did you uninstall the first instance before running the installer again?
VintagixOP
yes
I made sure to not have nodejs on my pc before reinstalling it
so I assume it's a Next.js issue on my end ? It's my first time using this so i'm completely new. I did setup my project with the
@latest Next.js version thoughSo i'm just confused
Sun bear
It shouldn't be a next.js related issue.
VintagixOP
Okok
Do you have any idea on how we could solve this issue ?
Sun bear
I've searched the web and there are some people that have fixed it by using another package manager.
Try deleting the
node_modulesSun bear
Installing the pnpm with the following command:
corepack enable pnpmAnswer
Sun bear
and running:
# install the packages
pnpm install
# run the dev server
pnpm run dev@Vintagix
If that does not work try installing the
nvm and changing the version through itVintagixOP
alright i'll try when i have the time
I'll let you know
Sun bear
the pnpm?
Sun bear
it's probably because when uninstalling node the
npm package manager has not been uninstalled properly and it used the same version of node or something like that.either way you should be using pnpm so it's a good practice and you don't have to worry about the above
Sun bear
No problem, happy coding :D
VintagixOP
Thank you!