pmndrs / react-three-next

React Three Fiber, Threejs, Nextjs starter
https://react-three-next.vercel.app/
MIT License
2.52k stars 342 forks source link

Install command with -ts result to "node version incompatible" error #135

Closed atzmael closed 1 year ago

atzmael commented 1 year ago

Hi I'm trying to install the project with yarn create r3f-app next my-app -ts When I first use it, the create-r3f-app and cloning works well, but then it runs into an error :

Command failed with exit code 1: yarn install
error next@13.4.3: The engine "node" is incompatible with this module. Expected version ">=16.8.0". Got "14.19.1"

So I use nvm to switch to 16.8.0 But then it runs into this error :

yarn create r3f-app next test -ts
yarn create v1.22.11
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error create-strapi-app@3.6.8: The engine "node" is incompatible with this module. Expected version ">=10.16.0 <=14.x.x". Got "20.1.0"
error Found incompatible module.

I really don't know how to fix this !

yct37785 commented 1 year ago

Are you able to use the LTS version of node instead? 18.16.0. This is my version of node and running yarn create r3f-app next my-app -ts and then yarn run dev on my-app works.

Seems like a yarn or NextJS issue as seen here https://github.com/vercel/next.js/discussions/31307, maybe you can also take a look?

atzmael commented 1 year ago

Well, I followed the resolution of the issue on vercel, it was the package strapi strangely installed globally, so I removed it and it works well. Thanks @yct37785 !