React + create-react-app: Failed to minify error
See original GitHub issueI’m working on a React app. When running “npm run build” I receive the error below. Any help would be appreciated!
Failed to minify the code from this file:
./node_modules/ccxt/ccxt.js:51
Read more here: http://bit.ly/2tRViJ9
Issue Analytics
- State:
- Created 6 years ago
- Comments:17 (10 by maintainers)
Top Results From Across the Web
"Failed to minify the bundle" error on build (related to Terser)
yarn build works for me right after npx create-react-app , but fails if I delete yarn.lock and node_modules , and reinstall the modules...
Read more >Failed to minify the code from this file - Stack Overflow
npm run build fails to minify Before react-scripts@2.0.0 , this problem was caused by third party node_modules using modern JavaScript ...
Read more >Resolving "Failed to minify the bundle" Errors - CircleCI Support
TerserWebpackPlugin The following error message is usually related to running out of memory during a job: Failed to minify the bundle....
Read more >Optimizing Performance - React
If you're benchmarking or experiencing performance problems in your React apps, make sure you're testing with the minified production build.
Read more >[Solved]-Failed to minify the bundle. Error - appsloveworld.com
Failed to minify the bundle. · Exclude JSON files from the main bundle with webpack for react-lottie · How do I resolve the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Created a fresh install of “create-react-app” and ran the command “npm install ccxt --save”. Was able to reproduce the issue, same minify error occurs.
Repo with minimal project - https://github.com/sib-wolf/ccxt-test
Hello - I wanted to add some additional information to this issue, since I’m experiencing it as well, but have a few extra observations.
Create-react-app build script fails with error:
What’s interesting, however, is that it didn’t fail before. When I first installed the ccxt package (“ccxt”: “^1.9.154”) it was building fine, I even deployed it to heroku, and it’s still live here: https://crypto-bot-trm313.herokuapp.com/ (git repo https://github.com/trm313/crypto-bot)
Yesterday, I tried to push some new changes which was when I experienced the build error for the first time. At this point, I had not modified the ccxt release I was using, although I did add some extra code with it in my app (specifically an API route that accessed the fetchTickers() function)
I tried updating to the latest release (1.9.250), but the error remains.
From the research I’ve done, I think you’re correct that CRA can’t handle any ES6 code, and as you pointed out, I’m sure ejecting the app would work as well, but obviously that’s not ideal, so wanted to share the other info I had in case it points to an easier fix