create-react-app: Build error: Skipping static resource ... - max size is 2.1 MB
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!!!
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (6 by maintainers)
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.