Build error: Skipping static resource ... - max size is 2.1 MB
See original GitHub issueHi all, I got problem when run yarn build
.
⇒ yarn build
yarn build v0.24.5
$ react-scripts build
Creating an optimized production build...
Skipping static resource ".../react-example/build/static/js/main.aa0e5d44.js" (2.24 MB) - max size is 2.1 MB
Failed to compile.
static/js/main.aa0e5d44.js from UglifyJs
Unexpected token: operator (>) [./~/get-stream/buffer-stream.js:4,0][static/js/main.aa0e5d44.js:35510,23]
error Command failed with exit code 1.
I’m using the lates yarn
with node 6.10.3
I created an example repo with build error here.
Can you help me to figure out why the project failed to compile? Thank you!!!
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
Skipping static resource max size is 2.1 MB causes service ...
Expected behavior. Either a warning about file size and the file is still added to the cache, or a more explicit warning that...
Read more >Maximum file size for polymer build? - Stack Overflow
No, there is no file size limit that would cause those errors. That message is from sw-precache , which has a default max...
Read more >Developers - Skipping static resource max size is 2.1 MB causes ...
Skipping static resource max size is 2.1 MB causes service worker to not cache main.js.
Read more >Node.js v19.3.0 Documentation
Building ; Linking to libraries included with Node.js ... --max-old-space-size=SIZE (in megabytes); --max-semi-space-size=SIZE (in megabytes). Console.
Read more >How to fix build failures with `create-react-app` in production
If your build is using create-react-app and has been failing since approximately the 18th of June 2020, this post will help you fix...
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
I suggest you not to rely on IDEs for imports too much. They don’t really understand what’s going on, and can offer confusing suggestions. You should write imports the way they’re written in package documentation, regardless of whether IDE thinks it’s right or not.
Dan you make an excellent point regarding IDEs. If you happen to have/know a .vimrc that’s ES6 ready, I’d be quite interested. Either way thanks for your efforts! 💯