question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to build in React: Failed to Minify

See original GitHub issue

I’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:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
roryrjbcommented, Nov 4, 2018

@Qix- also ran into this issue, basically older versions of react-scripts, a dependency of create-react-app, don’t support ES6 when minifying and can confirm that using debug@3 works in this scenario. For anyone else the latest versions of v1.x and v2.x branches of create-react-app work with ES6 dependencies out of the box.

1reaction
spideeeecommented, Oct 26, 2018

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found