Unable to install @mui/material-icons last version
See original GitHub issueHello,
since @material-ui/icons v2.0.1, I’m unable to install it using yarn (v1.9.2).
It just timeout after a while and multiple info There appears to be trouble with your network connection. Retrying...
messages.
Here is the error from yarn :
Trace:
Error: https://registry.yarnpkg.com/@material-ui/icons/-/icons-2.0.1.tgz: ESOCKETTIMEDOUT
at ClientRequest.<anonymous> (/usr/share/yarn/lib/cli.js:138043:19)
at Object.onceWrapper (events.js:273:13)
at ClientRequest.emit (events.js:182:13)
at TLSSocket.emitRequestTimeout (_http_client.js:652:40)
at Object.onceWrapper (events.js:273:13)
at TLSSocket.emit (events.js:182:13)
at TLSSocket.Socket._onTimeout (net.js:448:8)
at ontimeout (timers.js:424:11)
at tryOnTimeout (timers.js:288:5)
at listOnTimeout (timers.js:251:5)
- This is a v1.x issue.
- I have searched the issues of this repository and believe that this is not a duplicate.
EDIT : apparently it’s a known issue : https://github.com/yarnpkg/yarn/issues/6221
- May 5, 2021: 48 upvotes
- October 30, 2021: 57 upvotes
- January 5, 2022: 60 upvotes
- July 25, 2022: 65 upvotes
Issue Analytics
- State:
- Created 5 years ago
- Reactions:74
- Comments:36 (20 by maintainers)
Top Results From Across the Web
Module not found: Can't resolve '@mui/icons-material ...
I am trying to import "FileDownloadIcon" from Material icons. Installing "@material-ui/core": npm i @material-ui/core. Installing "@material-ui ...
Read more >@mui/icons-material - npm
Latest version : 5.11.0, last published: 15 days ago. Start using @mui/icons-material in your project by running `npm i @mui/icons-material`.
Read more >Module not found: Can't resolve '@mui/material' | bobbyhadz
To solve the error "Module not found: Error: Can't resolve '@mui/material'", make sure to install the package by opening your terminal in your...
Read more >Installation - Material UI - MUI
Install Material UI, the world's most popular React UI framework. ... The UMD links use the latest tag to point to the latest...
Read more >@mui/icons-material | Yarn - Package Manager
with npm npm install @mui/icons-material // with yarn yarn add @mui/icons-material ... A big thanks to the 19 contributors who made this release...
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 found a solution here : https://github.com/yarnpkg/yarn/issues/4890#issuecomment-348479446
So either:
yarn add @mui/material-icons --network-timeout 500000
.yarnrc
file inside your project with this content:I think reducing the package size to the minimum would be great. People can always go with a babel solution such as https://github.com/lodash/babel-plugin-lodash to rewrite the import.
The default timeout of yarn is 30s https://github.com/yarnpkg/yarn/blob/a4708b29ac74df97bac45365cba4f1d62537ceb7/src/constants.js#L40
In #25055, we resync the icons with https://material.io/. We are adding extra icons. We go from 1,300 to 1,700 x5 themes.
Soon or later we are going to hit a wall. Please upvote the issue if you are facing the problem. https://github.com/mui-org/material-ui/issues/12432#issuecomment-411046157 seems to be still a good workaround.
Also, note that in v5.0.0-alpha.26 we should still have a lighter icons packages size than when the issue was open (v2) if you can trust: https://packagephobia.com/result?p=@material-ui/icons. So it might not be that bad 😃.