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

react-script 5.0.0 issue for use-contractkit #152

Closed
davilink92 opened this issue Mar 29, 2022 · 5 comments
Closed

react-script 5.0.0 issue for use-contractkit #152

davilink92 opened this issue Mar 29, 2022 · 5 comments
Assignees
Labels

Comments

@davilink92
Copy link

Hello everyone,
I implemented use-contrackit on a react project, but i have some error in several libraries.

For example, i encurred in this error: "Module not found: Error: Can’t resolve ‘crypto’" or Browser etc.

Someone resolved it without use react-app-rewired or similar?

I found that is a problem with react script 5.0.0 that use a new version of webpack.

I would like to resolve without having to downgrade.

Thank you,

regards

@critesjosh
Copy link

@nicolasbrugneaux
Copy link
Contributor

Hi @davilink92 do you still have the issue?

@davilink92
Copy link
Author

Hi @davilink92 do you still have the issue?

Yes, i have it with react-script 5.0.0, so i did dowgrade react-script 5.0.0 to 4.0.3. :(

@nicolasbrugneaux nicolasbrugneaux self-assigned this Apr 26, 2022
@nicolasbrugneaux
Copy link
Contributor

Finally had the time to investigate this and reproduce it locally. While this is a real bug, we can't really do anything about it at the moment, this is on Facebook's side when they upgraded CRA to use webpack 5. You can see their team discussing the issue here: facebook/create-react-app#11756

From here you have different choices. You can stick to CRA 4.x as you did. You can use CRACO (https://github.com/gsoft-inc/craco) to include manually the polyfills. Or simply wait for CRA's team to merge the fix and release it (they have a PR close to being merged here facebook/create-react-app#11764 that does just that.)

I understand this can be frustrating. As a side note, you can use react 18 with CRA 4.x with no problems AFAIK, so maybe that's worth a try?

@paulayo93
Copy link

Finally had the time to investigate this and reproduce it locally. While this is a real bug, we can't really do anything about it at the moment, this is on Facebook's side when they upgraded CRA to use webpack 5. You can see their team discussing the issue here: facebook/create-react-app#11756

From here you have different choices. You can stick to CRA 4.x as you did. You can use CRACO (https://github.com/gsoft-inc/craco) to include manually the polyfills. Or simply wait for CRA's team to merge the fix and release it (they have a PR close to being merged here facebook/create-react-app#11764 that does just that.)

I understand this can be frustrating. As a side note, you can use react 18 with CRA 4.x with no problems AFAIK, so maybe that's worth a try?

please I need help with this @nicolasbrugneaux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants