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

Cannot find module error #83

Closed hyamero closed 2 years ago

hyamero commented 2 years ago

Template: yarn create r3f-app next my-app -ts

module-err Cannot find module 'module'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?

tsconfig.json: err-2 Option '--resolveJsonModule' cannot be specified without 'node' module resolution strategy.

Adding "moduleResolution": "node" in tsconfig.json fixes the issue

RenaudRohlinger commented 2 years ago

Thanks for the feedback. I added a custom tsconfig for typescript in the CLI: https://github.com/utsuboco/create-r3f-app/commit/18152a0f386beb640c6a15a857099b824f315584#diff-c565210742385118748417cad32c9455819f02fa7a07850ffb46ca92dc769beeR96-R119

It would be great if you could try again to see if it fixes your issue.

hyamero commented 2 years ago

This fixed the issue, thanks @RenaudRohlinger!