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.

Bug, npm fails to minify with create-react-app

See original GitHub issue

https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#npm-run-build-fails-to-minify

You may occasionally find a package you depend on needs compiled or ships code for a non-browser environment.
This is considered poor practice in the ecosystem and does not have an escape hatch in Create React App.

To resolve this:

Open an issue on the dependency's issue tracker and ask that the package be published pre-compiled (retaining ES6 Modules).

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:7

github_iconTop GitHub Comments

4reactions
Geczycommented, Sep 10, 2017

import Select from 'react-select/dist/react-select'

Am able to bypass error by doing this import instead for now

1reaction
Geczycommented, Sep 10, 2017
Failed to minify the code from this file: 

        ./node_modules/react-select/lib/Select.js:39 

https://github.com/JedWatson/react-select/blob/master/lib/Select.js#L39

Read more comments on GitHub >

github_iconTop 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 >
Unable to minify react application to production - Stack Overflow
I'm having issued generate a production build of the react application and have this error. Failed to minify the code from this file:...
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 >
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 >
react-app-rewired - npm
1) Install react-app-rewired · 2) Create a config-overrides.js file in the root directory · 3) 'Flip' the existing calls to react-scripts in npm...
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