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

Unable to build in React: Failed to Minify #630

Closed
dave-ops opened this issue Oct 25, 2018 · 6 comments
Closed

Unable to build in React: Failed to Minify #630

dave-ops opened this issue Oct 25, 2018 · 6 comments
Labels
awaiting-response This issue or pull request is awaiting a user's response

Comments

@dave-ops
Copy link

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
@Qix-
Copy link
Member

Qix- commented Oct 25, 2018

What is the reason? Any other errors?

@Qix- Qix- added the awaiting-response This issue or pull request is awaiting a user's response label Oct 25, 2018
@Qix-
Copy link
Member

Qix- commented Oct 25, 2018

I'm not sure what you mean. Why is the minifier failing? There is no error message there except that the minifier failed.

There's nothing I can do without an error message.

@spideeee
Copy link

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.

@Qix-
Copy link
Member

Qix- commented Oct 26, 2018

That doesn't fix the issue. ../dist/ isn't supported and will probably get removed. Don't do that.

You have not given me an error message, but this doesn't sound like debug's problem. It really sounds like your minifier doesn't support ES6. Does downgrading to debug@3 fix your issue?

@roryrjb
Copy link

roryrjb commented 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.

@Qix-
Copy link
Member

Qix- commented Nov 4, 2018

Thanks for the update @roryrjb :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting-response This issue or pull request is awaiting a user's response
Development

No branches or pull requests

4 participants