Skip to content

React is bundled when it shouldn't be #249

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
jsebrech opened this issue Aug 6, 2021 · 1 comment · Fixed by #251
Closed

React is bundled when it shouldn't be #249

jsebrech opened this issue Aug 6, 2021 · 1 comment · Fixed by #251
Assignees
Labels
bug Something isn't working

Comments

@jsebrech
Copy link
Contributor

jsebrech commented Aug 6, 2021

Describe the bug

A version of react and react-dom is bundled with @acpaas-ui/react-components. This causes problems when projects using these components have a different version of react. This should be a peer dependency and should not be bundled into the build.

To Reproduce

Steps to reproduce the behavior:

  1. Create a new Antwerp UI React project with the Digipolis UI starter kit
  2. Copy the Telephonenumber example out of the examples
  3. Try to run
  4. See error https://reactjs.org/warnings/invalid-hook-call-warning.html

Expected behavior

react and react-dom are not bundled into the build but are peer dependencies

Additional context

Reported for "Regie Kinderopvang" by Aptus

@jsebrech jsebrech added the bug Something isn't working label Aug 6, 2021
@jsebrech jsebrech self-assigned this Aug 6, 2021
@jsebrech
Copy link
Contributor Author

jsebrech commented Aug 6, 2021

As workaround a project can set their react and react-dom versions in package.json to be identical to that of the react-components dependency, delete node_modules and package-lock.json and reinstall packages. That will make sure only one copy of react is used.

jsebrech added a commit that referenced this issue Aug 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant