Next.js Discord

Discord Forum

Next.js server doesn't start

Answered
Vintagix posted this in #help-forum
Open in Discord
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 pnpm
View full answer

37 Replies

Note that I already tried to reinstall node.js, still the same error :/ (please ping me)
up ^
Sun bear
how did you install node?
@Vintagix
through the official website i believe?
Sun bear
did you uninstall the first instance before running the installer again?
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 though
So i'm just confused
Sun bear
It shouldn't be a next.js related issue.
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_modules
Sun bear
Installing the pnpm with the following command:
corepack enable pnpm
Answer
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 it
alright i'll try when i have the time
I'll let you know
YES
IT WORKS
THANK YOU
Sun bear
the pnpm?
yes
i was stuck on it for like a week
so it really helped me
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
alright good to know
well
Thank you very much again
Sun bear
No problem, happy coding :D
Thank you!