Build warning /static/js/filename.chunk.js is 3.87 MB, and won't be precached. Configure maximumFileSizeToCacheInBytes to change this limit.
See original GitHub issueDescribe the bug
After updating to v4.0.0 when I build I get the below warning, which causes the build to fail in CI environment:
/static/js/155.6cc63d87.chunk.js is 3.87 MB, and won't be precached. Configure maximumFileSizeToCacheInBytes to change this limit.
The weird thing is that when I build, the output of the build command doesnt show the file to be that size
637.26 KB build\static\js\155.6cc63d87.chunk.js
However, if I list the file directly it is much bigger than the build output says it is:
-a---- 11/2/2020 8:34 AM 3874415 155.6cc63d87.chunk.js
-a---- 11/2/2020 8:34 AM 4248 155.6cc63d87.chunk.js.LICENSE.txt
-a---- 11/2/2020 8:34 AM 7869621 155.6cc63d87.chunk.js.map
Did you try recovering your dependencies?
Yes. Deleted node_modules, yarn.lock - did not help
Which terms did you search for in User Guide?
n/a
Environment
Environment Info:
current version of create-react-app: 4.0.0
running from C:\Users\cbraunstein\AppData\Roaming\npm-cache\_npx\17108\node_modules\create-react-app
System:
OS: Windows 10 10.0.20246
CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
Binaries:
Node: 12.18.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.5 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.14.4 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 86.0.4240.111
Edge: Spartan (44.20246.1.0), ChromiumDev (88.0.680.1)
Internet Explorer: 11.0.20246.1
npmPackages:
react: 17.0.1 => 17.0.1
react-dom: 17.0.1 => 17.0.1
react-scripts: 4.0.0 => 4.0.0
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
(Write your steps here:)
yarn build
Expected behavior
No warning should be outputted
Actual behavior
A warning is outputted from the build. In case of a CI the build is failed.
Reproducible demo
I can not share this project. I will try to create a blank one and see if I can recreate it.
~\..\..\devops main ≣ ~1 -0 ! yarn build
yarn run v1.22.5
$ react-scripts build
Creating an optimized production build...
Compiled with warnings.
/static/js/155.6cc63d87.chunk.js is 3.87 MB, and won't be precached. Configure maximumFileSizeToCacheInBytes to change this limit.
Search for the keywords to learn more about each warning.
To ignore, add // eslint-disable-next-line to the line before.
File sizes after gzip:
637.26 KB build\static\js\155.6cc63d87.chunk.js
63.52 KB build\static\js\159.768d4811.chunk.js
19.48 KB build\static\js\157.913aa113.chunk.js
11.56 KB build\static\js\156.6ba34070.chunk.js
9.91 KB build\static\js\main.d5a9c99f.chunk.js
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:10
Top Results From Across the Web
progressive web apps - Won't be precached. Configure ...
WARNING in css/app.css is 4.13 MB, and won't be precached. Configure maximumFileSizeToCacheInBytes to change this limit. What does the warning ...
Read more >precached. Configure maximumFileSizeToCacheInBytes to ...
Hi! I'm not 100% sure to have fully understood your question. But if you need to customize that value as mentioned in the...
Read more >Workaround for cache size limit in Create React...anycodings
After some research I found two issues solutions: eject from CRA; use a tool to override the configuration.
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
This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 5 days if no further activity occurs.
Facing the same issues in deploying the app on netlify