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.

Build error: Skipping static resource ... - max size is 2.1 MB

See original GitHub issue

Hi 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:closed
  • Created 6 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
gaearoncommented, Jun 14, 2017

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.

0reactions
onpawscommented, Jun 27, 2017

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! 💯

Read more comments on GitHub >

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

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