Unable to build in React: Failed to Minify
See original GitHub issueI’m unable to build my React project. Getting a failed to minify the code error.
Creating an optimized production build...
Failed to compile.
Failed to minify the code from this file:
./node_modules/debug/src/browser.js:155
Read more here: http://bit.ly/2tRViJ9
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! geotrak_react@0.1.0 build: `react-scripts build`
npm ERR! Exit status 1
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:6 (4 by maintainers)
Top Results From Across the Web
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 >Failed to minify the code from this file #3734 - GitHub
Hello I just started using react. I'm running react-script build and getting an error similar to the one posted here. > react-scripts build...
Read more >Resolving "Failed to minify the bundle" Errors - CircleCI Support
The following error message is usually related to running out of memory during a job: Failed to minify the bundle.
Read more >Error Decoder - React
In the minified production build of React, we avoid sending down full error messages in order to reduce the number of bytes sent...
Read more >Unable to build react app using npm run build - Exit status 1 ...
How do I resolve the React app error for npm run build "Failed to compile. Failed to minify the bundle."? ... How to...
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
@Qix- also ran into this issue, basically older versions of
react-scripts
, a dependency ofcreate-react-app
, don’t support ES6 when minifying and can confirm that usingdebug@3
works in this scenario. For anyone else the latest versions ofv1.x
andv2.x
branches ofcreate-react-app
work with ES6 dependencies out of the box.I have tested by creating a default CRA app, installed this module (4.1.0), used it in the code and ran build command and everything seems to be working fine. The build package generated successfully. If you haven’t changed the file (browser.js), try cleaning the node_modules folder and install again.