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

craco build fails after upgrading to react-scripts v5 #356

Closed
Nefcanto opened this issue Dec 20, 2021 · 4 comments
Closed

craco build fails after upgrading to react-scripts v5 #356

Nefcanto opened this issue Dec 20, 2021 · 4 comments

Comments

@Nefcanto
Copy link

Hello

I'm using CRACO and everything worked fine, until two days ago I upgraded to react-scripts v5. Now the craco start works and I can develop, but the craco build fails with a vague message that only points to the entire src directory.

I checked my code, and no change is made that contains ....

Step 13/20 : RUN npm run build
 ---> Running in be63fc0279e8

> panel@0.1.0 build
> craco build

Creating an optimized production build...
Failed to compile.

Module not found: Error: Can't resolve '...' in '/Company/Project/src'


The command '/bin/sh -c npm run build' returned a non-zero code: 1

How can I debug this error?

@jissereitsma
Copy link

I'm suffering from a different issue where Craco builds with an error match.loader.options.plugins is not a function. This is related to the upgrade of Webpack with the newest CRA release. Not sure what to do yet though.

@Nefcanto
Copy link
Author

If you're using Tailwind, upgrade to version 3 and remove its config from CRACO. That worked for me.

@jissereitsma
Copy link

Thanks. No, I'm using various Webpack plugins that need to be added - Craco is still meant specifically for Webpack 4, I guess.

@patricklafrance
Copy link
Contributor

Duplicate of #378

@patricklafrance patricklafrance marked this as a duplicate of #378 Jan 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants