react-postprocessing icon indicating copy to clipboard operation
react-postprocessing copied to clipboard

SSR not working in Nextjs 13 (Reproduction in description)

Open ThimoDEV opened this issue 2 years ago • 2 comments

Hey!

I tried to use the react postprocessing SSR module, but it doesn't seem to work in Nextjs 13

I made a repro repo that shows this codesandbox: https://codesandbox.io/s/ssr-test-8pbw1f?file=/src/App.js:1136-2603

https://github.com/ThimoDEV/next-13-ssr-bug

Bugs:

  1. after some time this error pops up, it is triggered often on resize but I can't get it consistently image

The other errors are related to the vertex shader, but I don't know what might cause it. image

ThimoDEV avatar May 07 '23 10:05 ThimoDEV

I did some further research and found the following:

The bug is caused by ThreeJS version 0.151.0 and above.

I kept alle react three libraries to the latest version and on three version 0.150.1 SSR still works.

https://github.com/mrdoob/three.js/wiki/Migration-Guide#r150--r151

I assume SSR uses something that is in this migration guide?

ThimoDEV avatar May 07 '23 11:05 ThimoDEV

After further inspection I noticed its both react-postprocessing above version 2.6.1 and threejs above version 0.150.1 breaking SSR

ThimoDEV avatar May 07 '23 12:05 ThimoDEV