-
-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Failed to build react app from scratch: Failed to minify the bundle. Error: static/js/main.a07f295c.chunk.js from Terser #6336
Comments
Well, it seems that terser is the reason. Try to install |
I had the same problem. Workaround worked! Thanks. |
also having this issue with a fresh create-react-app. installing terser works for now |
Same problem in GitLab and locally on Mac. Resolved with $ npm install [email protected] |
Same problem on Debian. Resolved with $ npm install [email protected] |
Same problem. Thanks for VassilisPallas. "npm install [email protected] --save-dev" resolved the problem. |
@VassilisPallas Thanks, it fixed it |
Solution: |
On a heroku server, tried all this solution, but doesn't workout. Nor heroku doesn't take in count the update of the npm package, not i don't know. Shall i rethink my heroku build?
when i check my npm package its confirm that the installed version is terser 3,14 and localy build are working.... |
@erwanriou |
@noircir unfortunatly no i don't user yarn in this project. I was relying just on npm. Shall i try to install yarn somehow just to handle this case? |
ok i fix how to do it. We have to change the script just for this case: ` "heroku-postbuild": "NPM_CONFIG_PRODUCTION=false npm install --prefix client && npm install [email protected] --prefix client && npm run build --prefix client" ` ` Running heroku-postbuild
|
Amazing, I was having the exact same problem. Works now. Thanks! |
The workaround works, however, if you already have |
@erwanriou |
I had the same issue with using Yarn. Switching to NPM and using Terser as a Dev dependency solved my issue |
For yarn users: add this to "resolutions": {
"terser": "3.14.1"
} |
We are still tracking this issue, and waiting for either Terser or |
Please track any further comments against this ticket #6334. |
This fixed my issue (y)
|
I'll lock this issue, please use #6334 to discuss workarounds. |
Is this a bug report?
Yes
Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
Environment
Environment Info:
System:
OS: Linux 4.4 Ubuntu 16.04.5 LTS (Xenial Xerus)
CPU: x64 Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
Binaries:
Node: 10.15.1 - /usr/bin/node
npm: 6.7.0 - /usr/bin/npm
npmPackages:
react: ^16.7.0 => 16.7.0
react-dom: ^16.7.0 => 16.7.0
react-scripts: 2.1.3 => 2.1.3
npmGlobalPackages:
create-react-app: 2.1.3
Steps to Reproduce
curl -sL https://deb.nodesource.com/setup_10.x | sudo bash - sudo apt-get -y -q update sudo apt-get install -y nodejs sudo apt-get install -y python build-essential sudo npm install -g npm@latest sudo npm install create-react-app
npx create-react-app my-app
cd my-app
npm run build
Expected Behavior
Successful build.
Actual Behavior
Error in log file
Output of running
npx create-react-app my-app
The text was updated successfully, but these errors were encountered: