You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After upgrading to Next.js 15, I get the following error when importing. Everything worked great with Next.js 14.2.7.
TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher') at http://localhost:3000/_next/static/chunks/node_modules__pnpm_157f4a._.js:26220:19 at vr (http://localhost:3000/_next/static/chunks/node_modules__pnpm_157f4a._.js:26621:6) at [project]/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_react-d_fbv5bfsjqsehsl6cjhgfvaqu2a/node_modules/three-custom-shader-material/three-custom-shader-material.es.js [app-client] (ecmascript) (http://localhost:3000/_next/static/chunks/node_modules__pnpm_157f4a._.js:26623:90) at http://localhost:3000/_next/static/chunks/_8b5f57._.js:693:27 at runModuleExecutionHooks (http://localhost:3000/_next/static/chunks/_8b5f57._.js:738:9) at instantiateModule (http://localhost:3000/_next/static/chunks/_8b5f57._.js:691:9) at getOrInstantiateModuleFromParent (http://localhost:3000/_next/static/chunks/_8b5f57._.js:624:12) at esmImport (http://localhost:3000/_next/static/chunks/_8b5f57._.js:142:20) at [project]/components/3D/Materials/PlanetMaterial.tsx [app-client] (ecmascript) (http://localhost:3000/_next/static/chunks/_e03f14._.js:3622:417) at http://localhost:3000/_next/static/chunks/_8b5f57._.js:693:27 at runModuleExecutionHooks (http://localhost:3000/_next/static/chunks/_8b5f57._.js:738:9) at instantiateModule (http://localhost:3000/_next/static/chunks/_8b5f57._.js:691:9) at getOrInstantiateModuleFromParent (http://localhost:3000/_next/static/chunks/_8b5f57._.js:624:12) at esmImport (http://localhost:3000/_next/static/chunks/_8b5f57._.js:142:20) at [project]/components/3D/Models/Planet.tsx [app-client] (ecmascript) (http://localhost:3000/_next/static/chunks/_e03f14._.js:4642:155) at http://localhost:3000/_next/static/chunks/_8b5f57._.js:693:27 at runModuleExecutionHooks (http://localhost:3000/_next/static/chunks/_8b5f57._.js:738:9) at instantiateModule (http://localhost:3000/_next/static/chunks/_8b5f57._.js:691:9) at getOrInstantiateModuleFromParent (http://localhost:3000/_next/static/chunks/_8b5f57._.js:624:12) at esmImport (http://localhost:3000/_next/static/chunks/_8b5f57._.js:142:20) at [project]/components/3D/Scenes/Planets.tsx [app-client] (ecmascript) (http://localhost:3000/_next/static/chunks/_e03f14._.js:5079:144) at http://localhost:3000/_next/static/chunks/_8b5f57._.js:693:27 at runModuleExecutionHooks (http://localhost:3000/_next/static/chunks/_8b5f57._.js:738:9) at instantiateModule (http://localhost:3000/_next/static/chunks/_8b5f57._.js:691:9) at getOrInstantiateModuleFromParent (http://localhost:3000/_next/static/chunks/_8b5f57._.js:624:12) at esmImport (http://localhost:3000/_next/static/chunks/_8b5f57._.js:142:20) at [project]/components/3D/Scene.tsx [app-client] (ecmascript) (http://localhost:3000/_next/static/chunks/_e03f14._.js:5802:145) at http://localhost:3000/_next/static/chunks/_8b5f57._.js:693:27 at runModuleExecutionHooks (http://localhost:3000/_next/static/chunks/_8b5f57._.js:738:9) at instantiateModule (http://localhost:3000/_next/static/chunks/_8b5f57._.js:691:9) at getOrInstantiateModuleFromParent (http://localhost:3000/_next/static/chunks/_8b5f57._.js:624:12) at commonJsRequire (http://localhost:3000/_next/static/chunks/_8b5f57._.js:157:20) at requireModule (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_f5d8d0._.js:2671:29) at initializeModuleChunk (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_f5d8d0._.js:3213:25) at readChunk (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_f5d8d0._.js:3118:17) at react-stack-bottom-frame (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_react-dom_f5cd7a._.js:12453:20) at beginWork (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_react-dom_f5cd7a._.js:5335:77) at runWithFiberInDEV (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_react-dom_f5cd7a._.js:631:20) at performUnitOfWork (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_react-dom_f5cd7a._.js:7936:97) at workLoopSync (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_react-dom_f5cd7a._.js:7829:40) at renderRootSync (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_react-dom_f5cd7a._.js:7810:13) at performWorkOnRoot (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_react-dom_f5cd7a._.js:7553:148) at performWorkOnRootViaSchedulerTask (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_react-dom_f5cd7a._.js:8387:9) at MessagePort.performWorkUntilDeadline (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_f5d8d0._.js:2348:64)
The text was updated successfully, but these errors were encountered:
This is because React 19 is a breaking change. I will upgrade to React 19 once R3F releases v9. Untill then, it is not possible to use CSM in React 19. You can follow R3F v9 here: pmndrs/react-three-fiber#2338
Vanilla version should still work though, please confirm if it does.
Unfortunately, a lot of things regarding R3F, Drei and maybe even CSM (hard to know which error stems from where) don't work with React 19, so I'm going back to Next 14 and React 18 :)
After upgrading to Next.js 15, I get the following error when importing. Everything worked great with Next.js 14.2.7.
TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher') at http://localhost:3000/_next/static/chunks/node_modules__pnpm_157f4a._.js:26220:19 at vr (http://localhost:3000/_next/static/chunks/node_modules__pnpm_157f4a._.js:26621:6) at [project]/node_modules/.pnpm/[email protected]_@[email protected]_@[email protected]_react-d_fbv5bfsjqsehsl6cjhgfvaqu2a/node_modules/three-custom-shader-material/three-custom-shader-material.es.js [app-client] (ecmascript) (http://localhost:3000/_next/static/chunks/node_modules__pnpm_157f4a._.js:26623:90) at http://localhost:3000/_next/static/chunks/_8b5f57._.js:693:27 at runModuleExecutionHooks (http://localhost:3000/_next/static/chunks/_8b5f57._.js:738:9) at instantiateModule (http://localhost:3000/_next/static/chunks/_8b5f57._.js:691:9) at getOrInstantiateModuleFromParent (http://localhost:3000/_next/static/chunks/_8b5f57._.js:624:12) at esmImport (http://localhost:3000/_next/static/chunks/_8b5f57._.js:142:20) at [project]/components/3D/Materials/PlanetMaterial.tsx [app-client] (ecmascript) (http://localhost:3000/_next/static/chunks/_e03f14._.js:3622:417) at http://localhost:3000/_next/static/chunks/_8b5f57._.js:693:27 at runModuleExecutionHooks (http://localhost:3000/_next/static/chunks/_8b5f57._.js:738:9) at instantiateModule (http://localhost:3000/_next/static/chunks/_8b5f57._.js:691:9) at getOrInstantiateModuleFromParent (http://localhost:3000/_next/static/chunks/_8b5f57._.js:624:12) at esmImport (http://localhost:3000/_next/static/chunks/_8b5f57._.js:142:20) at [project]/components/3D/Models/Planet.tsx [app-client] (ecmascript) (http://localhost:3000/_next/static/chunks/_e03f14._.js:4642:155) at http://localhost:3000/_next/static/chunks/_8b5f57._.js:693:27 at runModuleExecutionHooks (http://localhost:3000/_next/static/chunks/_8b5f57._.js:738:9) at instantiateModule (http://localhost:3000/_next/static/chunks/_8b5f57._.js:691:9) at getOrInstantiateModuleFromParent (http://localhost:3000/_next/static/chunks/_8b5f57._.js:624:12) at esmImport (http://localhost:3000/_next/static/chunks/_8b5f57._.js:142:20) at [project]/components/3D/Scenes/Planets.tsx [app-client] (ecmascript) (http://localhost:3000/_next/static/chunks/_e03f14._.js:5079:144) at http://localhost:3000/_next/static/chunks/_8b5f57._.js:693:27 at runModuleExecutionHooks (http://localhost:3000/_next/static/chunks/_8b5f57._.js:738:9) at instantiateModule (http://localhost:3000/_next/static/chunks/_8b5f57._.js:691:9) at getOrInstantiateModuleFromParent (http://localhost:3000/_next/static/chunks/_8b5f57._.js:624:12) at esmImport (http://localhost:3000/_next/static/chunks/_8b5f57._.js:142:20) at [project]/components/3D/Scene.tsx [app-client] (ecmascript) (http://localhost:3000/_next/static/chunks/_e03f14._.js:5802:145) at http://localhost:3000/_next/static/chunks/_8b5f57._.js:693:27 at runModuleExecutionHooks (http://localhost:3000/_next/static/chunks/_8b5f57._.js:738:9) at instantiateModule (http://localhost:3000/_next/static/chunks/_8b5f57._.js:691:9) at getOrInstantiateModuleFromParent (http://localhost:3000/_next/static/chunks/_8b5f57._.js:624:12) at commonJsRequire (http://localhost:3000/_next/static/chunks/_8b5f57._.js:157:20) at requireModule (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_f5d8d0._.js:2671:29) at initializeModuleChunk (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_f5d8d0._.js:3213:25) at readChunk (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_f5d8d0._.js:3118:17) at react-stack-bottom-frame (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_react-dom_f5cd7a._.js:12453:20) at beginWork (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_react-dom_f5cd7a._.js:5335:77) at runWithFiberInDEV (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_react-dom_f5cd7a._.js:631:20) at performUnitOfWork (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_react-dom_f5cd7a._.js:7936:97) at workLoopSync (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_react-dom_f5cd7a._.js:7829:40) at renderRootSync (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_react-dom_f5cd7a._.js:7810:13) at performWorkOnRoot (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_react-dom_f5cd7a._.js:7553:148) at performWorkOnRootViaSchedulerTask (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_react-dom_f5cd7a._.js:8387:9) at MessagePort.performWorkUntilDeadline (http://localhost:3000/_next/static/chunks/0bc23_next_dist_compiled_f5d8d0._.js:2348:64)
The text was updated successfully, but these errors were encountered: