Skip to content

Minified React error #321 #6

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

Closed
seawind543 opened this issue Aug 9, 2021 · 1 comment · Fixed by #7
Closed

Minified React error #321 #6

seawind543 opened this issue Aug 9, 2021 · 1 comment · Fixed by #7
Assignees
Labels
bug Something isn't working runtime issue issue happened when runtime

Comments

@seawind543
Copy link
Owner

seawind543 commented Aug 9, 2021

Issue

Will get this runtime error when TokenInput is imported by npm:

Uncaught Error: Minified React error #321; visit https://reactjs.org/docs/error-decoder.html?invariant=321 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.

Impact

^1.0.0

@seawind543 seawind543 added the bug Something isn't working label Aug 9, 2021
@seawind543 seawind543 self-assigned this Aug 9, 2021
@seawind543 seawind543 added the runtime issue issue happened when runtime label Aug 9, 2021
seawind543 added a commit that referenced this issue Aug 9, 2021
[#6] fix: Unable to use when import from npm react issue #321
@seawind543
Copy link
Owner Author

Root cause

  • Have multiple instances of React

Solution

  • As list in [1]
    -- Add move react into devDependencies, and add peerDependencies too.
    -- Set externals for production webpack

Reference:

  1. Invariant Violation: Minified React error #321 facebook/react#16029 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working runtime issue issue happened when runtime
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant