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

Break with error on build production #12

Closed
glamer opened this issue Oct 17, 2020 · 9 comments
Closed

Break with error on build production #12

glamer opened this issue Oct 17, 2020 · 9 comments
Labels
question 🤔 Further information is requested

Comments

@glamer
Copy link

glamer commented Oct 17, 2020

When I try to build a production with any mention of tag <Reparentable>, the app throwing error with the message "invariant failed".

@paol-imi paol-imi added the question 🤔 Further information is requested label Oct 19, 2020
@ttopkl
Copy link

ttopkl commented Oct 19, 2020

I just tried to build an example from https://codesandbox.io/s/react-reparenting-reparentable-rvfi4
and get the same error

What did I do:

  1. https://codesandbox.io/s/react-reparenting-reparentable-rvfi4
  2. File -> Export to ZIP
  3. npm install
  4. npm run build
  5. start a local server

@paol-imi
Copy link
Owner

paol-imi commented Oct 22, 2020

With the arrival of React 17, it will no longer be possible to use react-reparenting in production mode. The package (in its version 0.4.0) will continue to work with react 16 both in production and in development mode.

@pie6k
Copy link

pie6k commented Oct 28, 2020

So to be clear - in React 17 this lib is not an option anymore?

What is the reason for this?

@paol-imi
Copy link
Owner

While no new features have been added in React 17, I will have to understand if and how the internals have been changed since 16. This is to try to avoid React internal misbehavior that would be impossible to debug.

I will work on an upcoming release to solve this problem.

@tarrencev
Copy link

any updates on this?

@paol-imi
Copy link
Owner

paol-imi commented Dec 3, 2020

The release has already been designed. Now I just have to write and publish it but I don't think I will have much free time for a few months. As soon as it is ready it will be available on github.

@coolbaluk
Copy link
Contributor

coolbaluk commented Dec 13, 2020

I'm having the same issue even when downgrading to React 16. Does anybody have a working example ?

Edit: React 16 works only with 0.4.0 of this library.

@Bartosz-L
Copy link

I'm having the same issue even when downgrading to React 16. Does anybody have a working example ?

Edit: React 16 works only with 0.4.0 of this library.

I can confirm the solution works. Saved my day. Thank you!

@paol-imi
Copy link
Owner

The new version of React-Reparenting should solve the problem, the API removed from version 0.4.0 are back available.
Please read carefully the warnings on the documentation site before using React-Reparenting in production code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question 🤔 Further information is requested
Projects
None yet
Development

No branches or pull requests

7 participants