FrameLoop.ts:173 Uncaught TypeError: r.willAdvance is not a function (react-three-fiber)

My site won’t load on netlify, it works fine when running from a local server without any console errors.

The netlify error displays:

FrameLoop.ts:173 Uncaught TypeError: r.willAdvance is not a function
at FrameLoop.ts:173
at Module.gu (react-dom.production.min.js:244)
at a.v.advance (FrameLoop.ts:169)
at Array. (index.ts:12)
at z (web.js:95)

Heres the deployment: https://jovial-lalande-5c2359.netlify.app

The total build size is: 27MB

I see a few people who have had a similar issue, but there was no solution. This is the first time I’ve deployed react-three-fiber to netlify.

Here’s the code: https://codesandbox.io/s/wonderful-haslett-rs4rc?file=/public/cityDraco.gltf

I cant add the other .gltf file because it’s too large for code sandboxes 2MB maximum so the code doesn’t run in code sandbox.

My textures and files are draco’d compressed multiple times and optimized. I’m not sure what I’m doing wrong. I believe that error is breaking the code.

it’s a bug in the current beta of react-spring, not related to threejs or r3f. there are manual solutions for now: https://github.com/pmndrs/react-spring/issues/1078