Failed to minify on production build
See original GitHub issueOk, so I created a new react app with create-react-app
, added react-plotly.js to my project/code, ran into the “using glsify without its transform applied” problem (issue #13), and after reading through the various solutions, opted to do a npm run eject
so I could add ify-loader
to my webpack.config.dev.js and webpack.config.prod.js (ala https://github.com/plotly/plotly.js#building-plotlyjs-with-webpack).
This fixed the problem in dev mode, and I can get my <Plot> component to display just fine when running the dev server (npm start). However, now if I try to do a ‘npm run build’ to build a production version, I get the following error:
Failed to compile.
Failed to minify the code from this file:
./node_modules/ify-loader!./node_modules/gl-matrix/src/gl-matrix/common.js:28
Read more here: http://bit.ly/2tRViJ9
I’ve looked around, but I can’t seem to find much of a hint on how to fix this… any ideas?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:9 (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 #1529 - GitHub
run yarn build getting errors. command: yarn build error: Creating an optimized production build... Failed to compile. Failed to minify the ...
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 >Npm - Matt Button
js Creating an optimized production build... Failed to compile. Failed to minify the code from this file: ./node_modules/@ckeditor/ckeditor5-build-classic/build ...
Read more >Failed to Minify - GSAP - GreenSock
Hey Guys, just updated to 2.0.0, also in 1.20.6 had this same problem... > react-scripts build Creating an optimized production build.
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
OK, so here’s a webpack configuration that works for me… The issue is resolved by adding the
es2015
preset tobabel-loader
to properly handle gl-matrix 😃You’ll need the following modules:
Same here.
JavaScript heap out of memory error.