You are using Node.js 18.7.0. For Next.js, Node.js version >= v18.17.0 is required.
Answered
Polar bear posted this in #help-forum
Polar bearOP
I dont understand:
root@localhost:/usr/local/openresty/nginx/nextjs# node -v
v18.7.0
root@localhost:/usr/local/openresty/nginx/nextjs# npm run start
You are using Node.js 18.7.0. For Next.js, Node.js version >= v18.17.0 is required.
root@localhost:/usr/local/openresty/nginx/nextjs# node -v
v18.7.0
root@localhost:/usr/local/openresty/nginx/nextjs# npm run start
new-website@0.1.0 start
next start
You are using Node.js 18.7.0. For Next.js, Node.js version >= v18.17.0 is required.
Answered by Rafael Almeida
you are using 18.7.0, this version of Next.js requires at least 18.17.0. notice your minor version is 7 and not 17
6 Replies
you are using 18.7.0, this version of Next.js requires at least 18.17.0. notice your minor version is 7 and not 17
Answer
Polar bearOP
Ooooh im blind sorry
I was very confused i didnt see the 1
One more small thing:
root@localhost:/usr/local/openresty/nginx/nextjs# n stable
installing : node-v20.11.1
mkdir : /usr/local/n/versions/node/20.11.1
fetch : https://nodejs.org/dist/v20.11.1/node-v20.11.1-linux-x64.tar.xz
copying : node/20.11.1
installed : v20.11.1 to /usr/local/bin/node
active : v18.7.0 at /usr/bin/node
How do i set the active version to the locally installed one?
root@localhost:/usr/local/openresty/nginx/nextjs# n stable
installing : node-v20.11.1
mkdir : /usr/local/n/versions/node/20.11.1
fetch : https://nodejs.org/dist/v20.11.1/node-v20.11.1-linux-x64.tar.xz
copying : node/20.11.1
installed : v20.11.1 to /usr/local/bin/node
active : v18.7.0 at /usr/bin/node
How do i set the active version to the locally installed one?
I think you are using https://github.com/tj/n to manage the Node.js installation? it looks like it always use the latest installed version, so if you restart this shell it might be already using v20
Polar bearOP
I see, thank you!