Conflict with React
salomaoluiz opened this issue · 3 comments
Hi, when I add the version v1.0, are created a folder named node_modules in the folder of the package with the folders .bin and react, this folder is conflicting with the project, resulting in the error:
Error: Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
1. You might have mismatching versions of React and the renderer (such as React DOM)
2. You might be breaking the Rules of Hooks
3. You might have more than one copy of React in the same app
See https://fb.me/react-invalid-hook-call for tips about how to debug and fix this problem.
If I delete the folder node_modules the app and lib will work again.
Thank you for opening this issue. I've pinged some other React developers and it looks like this error has occurred frequently in other modules that have react
and react-dom
as dependency. I'm merging a PR that seems to solve the problem. Please tell me whether that works for you too.
Please try version 1.0.1 and reopen the issue if the problem isn't gone.
Hi, unfortunately not works, I upgrade to version:
"react-native-user-inactivity": "^1.0.1-beta.1",
and I continue receiving the error, and if I delete node_modules
folder in the lib folder, it works again.