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

RHL breaks important information from React #1325

Closed
kud opened this issue Aug 22, 2019 · 2 comments
Closed

RHL breaks important information from React #1325

kud opened this issue Aug 22, 2019 · 2 comments

Comments

@kud
Copy link
Contributor

kud commented Aug 22, 2019

Description

What you are reporting: some error information is missing when RHL is enabled.

I recently had a problem. I forgot to export default a component I imported into another one.

And the errors from the console were not so explicit due to RHL.

Expected behavior

What you think should happen: when I disable RHL, I've got this kind of errors which helps me a lot:

 Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of `Element`.
    in Element (created by TextPageMainDivision)

or also:

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.

Check the render method of `Element`.

Actual behavior

What actually happens: when I enable RHL, I've got those errors:

TypeError: "undefined has no properties" in backend.js

or again:

TypeError: undefined has no properties react-hot-loader.development.js:1229

which is way less clear.

Environment

React Hot Loader version: 4.12.11

Run these commands in the project folder and fill in their results:

  1. node -v: v12.9.0
  2. npm -v: 6.11.1

Then, specify:

  1. Operating system: macOS 10.14.6
  2. Browser and version: Firefox 70.0a1 (2019-08-21) (64-bit)

Reproducible Demo

I'm sorry, I cannot yet.

@kud kud changed the title RHL breaks important informations when error RHL breaks important information when error Aug 22, 2019
@kud kud changed the title RHL breaks important information when error RHL breaks important information from React Aug 22, 2019
@theKashey
Copy link
Collaborator

Duplicate of #1324

@theKashey theKashey marked this as a duplicate of #1324 Aug 22, 2019
@kud
Copy link
Contributor Author

kud commented Aug 22, 2019

Thanks!

@kud kud closed this as completed Aug 22, 2019
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

No branches or pull requests

2 participants