Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Cannot read property 'replace' of undefined" in the overlay. #452

Closed
scriptex opened this issue Jul 21, 2021 · 1 comment · Fixed by #462
Closed

"Cannot read property 'replace' of undefined" in the overlay. #452

scriptex opened this issue Jul 21, 2021 · 1 comment · Fixed by #462

Comments

@scriptex
Copy link

scriptex commented Jul 21, 2021

I am experiencing a weird issue with this webpack plugin.
I am not sure what causes this because it occurs randomly but I noticed that it happens when:

  1. A path to an external asset (png, svg, or scss file) is changed
  2. A variable or property in the redux store is changed

The console output is not so helpful but I will paste it here:

Uncaught TypeError: Cannot read property 'replace' of undefined
    at CompileErrorTrace (CompileErrorTrace.js?88cb:25)
    at CompileErrorContainer (CompileErrorContainer.js?ee76:21)
    at eval (index.js?5a19:184)
    at ensureRootExists (index.js?5a19:139)
    at render (index.js?5a19:172)
    at showRuntimeErrors (index.js?5a19:294)
    at eval (utils.js?6b9c:23)

The same error is being thrown over and over until I reload my browser. Then the build crashes and I see white screen.

Here is a screenshot from the browser console:
Screenshot 2021-07-21 at 11 29 13

I have updated to version 0.5.0-rc.2 but the same issue occurred with the previous version I was using (0.4.3).

Any help will be highly appreciated.

Edit: Maybe it's worth mentioning that I am using React and Redux with TypeScript in a custom Webpack configuration.
If needed I can provide parts of the Webpack config file which might be relevant for you to debug.

@pmmmwh
Copy link
Owner

pmmmwh commented Aug 8, 2021

Hi, please provide a reproduction - it is impossible for me to debug.

Alternatively, can you print out what errors are captured by the error overlay? There must be some other error triggering it right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants