Static site builds fail when running with client-side error TypeError: Cannot redefine property: _currentRenderer
See original GitHub issueI took the following steps to build the example site and export it as a static site:
yarn create r3f-app next my-app
cd my-app
npm run-script dev ==> site works fine when browsing to localhost:3000
npm run-script export then http-server out (after first npm installing http-server globally)
When viewing the page there is a client-side error:
“Application error: a client-side exception has occurred (see the browser console for more information).”
Console output looks like this:
framework-3583eef75b58b7b2.js:1 TypeError: Cannot redefine property: _currentRenderer
at Function.defineProperties (<anonymous>)
Issue Analytics
- State:
- Created a year ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
Cannot redefine property error when using jest.spyOn after v1 ...
spyOn fails with the following error: TypeError: Cannot redefine property: getRedis at Function.defineProperty (<anonymous>) at ModuleMocker ...
Read more >TypeError: can't redefine non-configurable property "x"
The JavaScript exception "can't redefine non-configurable property" occurs when it was attempted to redefine a property, but that property is non-configurable.
Read more >Why does my script throw 'Cannot redefine property: i' Error ...
Because your current code gets the name via fn.name it is not relying on either of those approaches, the minifier can't know to...
Read more >TypeError: can't redefine non-configurable property "x"
It was attempted to redefine a property, but that property is non-configurable. The configurable attribute controls whether the property can be ...
Read more >Uncaught TypeError: Cannot redefine property: text
I am trying to get ready for the upcoming LockerService critical update and I am seeing this error when loading my components ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Downgrading r3f from ^8.8.4 to 8.7.2 fixed this for me
Yes I also have this problem. When deploying to Vercel it also shows this error message.
Application error: a client-side exception has occurred (see the browser console for more information).
Did you get anywhere with this @ivyroot?