Open heesu-chung opened 1 year ago
I am experiencing the same error
Experiencing the same error
This is a common issue with Three.js' examples directory and NextJS. Can you please verify fix in v0.1.1
cc @heesu-chung @caticHarun @AmanKishore
New error
Error: require() of ES Module ...\node_modules\three\examples\jsm\postprocessing\Pass.js from ...\node_modules\three-gpu-pathtracer\build\index.umd.cjs not supported. Instead change the require of Pass.js in ...\node_modules\three-gpu-pathtracer\build\index.umd.cjs to a dynamic import() which is available in all CommonJS modules.
I have same issues using path-tracer with next.js but I fixed Check this issue https://github.com/gkjohnson/three-gpu-pathtracer/issues/358
I hope it would help cc. @heesu-chung @caticHarun @AmanKishore
solution : change three-gpu-pathtracer's package.json
"main" : build/index.umd.cjs => build/index.module.js
I have same issues using path-tracer with next.js but I fixed Check this issue gkjohnson/three-gpu-pathtracer#358
I hope it would help cc. @heesu-chung @caticHarun @AmanKishore
solution : change three-gpu-pathtracer's package.json
"main" : build/index.umd.cjs => build/index.module.js
Hey, how do you change the package.json, for me the change doesnt seem to apply. Thanks in advance!
I have same issues using path-tracer with next.js but I fixed Check this issue gkjohnson/three-gpu-pathtracer#358 I hope it would help cc. @heesu-chung @caticHarun @AmanKishore solution : change three-gpu-pathtracer's package.json
"main" : build/index.umd.cjs => build/index.module.js
Hey, how do you change the package.json, for me the change doesnt seem to apply. Thanks in advance!
I made a forked packages and then connect add git repo into my main project's package.json
Problem description:
Hello!
I'm now use this lib with @react-three/fiber, drei in nextjs.
When I use in NextJS 13, it gave me the not found module error (Cannot find module '.../node_modules/three/examples/jsm/postprocessing/Pass') which module actually exist.
Once I thought it is some kind of nextjs 'server side runtime issue' so that I tried 'use client' code to declare the component is not for server side but for client side component.
After I found out it doesn't work, I tried window undefined check. But it also doesn't work.
next/dynamic
doesn't work.
Now I need some advise for handle this problem. Is this the problem of server side runtime issue with nextjs or lib compatibility issue? I want to know what the problem is and how I can solve the error.
Here's the jsx return code which from basic example.
Relevant code:
Here's the error msg I get. Error Msg: