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.

Unable to install @mui/material-icons last version

See original GitHub issue

Hello,

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:closed
  • Created 5 years ago
  • Reactions:74
  • Comments:36 (20 by maintainers)

github_iconTop GitHub Comments

128reactions
jgouxcommented, Jul 25, 2022

I found a solution here : https://github.com/yarnpkg/yarn/issues/4890#issuecomment-348479446

So either:

  • install it using yarn add @mui/material-icons --network-timeout 500000
  • or create a .yarnrc file inside your project with this content:
network-timeout 500000

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

9reactions
oliviertassinaricommented, Mar 17, 2021

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 😃.

Read more comments on GitHub >

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

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