question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Static site builds fail when running with client-side error TypeError: Cannot redefine property: _currentRenderer

See original GitHub issue

I 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:closed
  • Created a year ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
skrichtencommented, Oct 7, 2022

Downgrading r3f from ^8.8.4 to 8.7.2 fixed this for me

1reaction
maxsilvaukcommented, Oct 4, 2022

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?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found