Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken dependency to @babel/runtime causing build errors #12408

Closed
calebj0seph opened this issue Aug 4, 2018 · 14 comments · Fixed by #12409
Closed

Broken dependency to @babel/runtime causing build errors #12408

calebj0seph opened this issue Aug 4, 2018 · 14 comments · Fixed by #12409
Assignees
Labels
bug 🐛 Something doesn't work

Comments

@calebj0seph
Copy link

calebj0seph commented Aug 4, 2018

@babel/runtime recently released version v7.0.0-beta.56, which split part of the package up into @babel/runtime-corejs2. This is a breaking change that affects Material-UI, causing errors like Error: Can't resolve '@babel/runtime/helpers/builtin/typeof'. The change happened as part of babel/babel#8266.

The root cause is because Material-UI depends on version ^7.0.0-beta.42 of @babel/runtime, which will select the latest breaking version v7.0.0-beta.56 on install.

As a quick workaround for anyone affected, you can run npm install --save-exact @babel/runtime@7.0.0-beta.55 if using npm or yarn add @babel/runtime@7.0.0-beta.55 --exact if using Yarn to revert back to the previous version of @babel/runtime compatible with Material-UI.

@basicBrogrammer
Copy link

If I could help fix the issue, I'd be down to pair with someone to fix it.

@msreekm
Copy link

msreekm commented Aug 4, 2018

got the error. thanks for the workaround. waiting for fix.

@numToStr
Copy link
Contributor

numToStr commented Aug 4, 2018

+1 Just got the issue. Thanks for the workaround

@dupski
Copy link

dupski commented Aug 4, 2018

Thanks for the workaround @calebj0seph

@YibaiLin
Copy link

YibaiLin commented Aug 4, 2018

Thanks for the workaround @calebj0seph , I'm using Yarn, and after I revert the version of @babel/runtime back, I need to run yarn clean cache to make it work .Hoping this would be fix soon.

@oliviertassinari
Copy link
Member

I'm releasing v1.4.3.

@suubee
Copy link

suubee commented Aug 4, 2018

Will .20.1 be updated as well, or does this spell the end for those of us still migrating and using both v.20.1 and v1.4.3?

@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 4, 2018

@suubee v0.x is no longer maintained, but it should still be working. The issue only impacts v1.x

@nareshbhatia
Copy link
Contributor

@oliviertassinari, curious how you are maintaining @material-ui/icons version 1.x & 2.x simultaneously. I see only a master branch. The reason I ask is that I saw version 1.4.3 and version 2.0.1 both released to fix this bug.

@papaponmx
Copy link

When should we expecte the update? @oliviertassinari.

PS: Thanks for the amazing work you are doing with the project. I'll take a look and try to contribute.

@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 4, 2018

For the record, @TrySound warned us about the possibility of this issue to come a few months ago. We are sticking to Next.js version of babel@next. Hopefully, they will soon upgrade it: https://github.com/zeit/next.js/blob/b492e6703de62e1b4a63957350108ce8db6eeb68/package.json#L65. Otherwise, we will have to look into how we can stay up to date.

how you are maintaining @material-ui/icons version 1.x & 2.x simultaneously

@nareshbhatia It's a very good question. I don't think that we have found the best approach yet. Right now, the changelog is primarily here to keep track of @material-ui/core. The other packages have independent versions. There are different alternatives:

  1. Move all the versions together like Babel is doing. Unfortunately, we have to account for the lab. This package will most likely always stay in the alpha state, all version upgrade are potential breaking changes.
  2. Better document each satellite packages upgrade in the changelog, with their own breaking changes section under the same release note.
  3. Use different tags and changelog notes for each package.

This is a high-level overview of the spectrum of tradeoffs we can use. Let me know if you have a preference. At the end of the day, we do all this effort for you guys, so you can easily leverage Material-UI in your codebase.

@oliviertassinari
Copy link
Member

@papaponmx It's already live.

@nareshbhatia
Copy link
Contributor

@oliviertassinari, that's a hard one to answer, but my preference would be 3 (different tags and changelog notes for each package). This gives the finest grain of control. If that's hard, the next preference would be # 2.

@FinnWinchester
Copy link

Keeps happening with MUI 1.5.1

@mui mui locked as resolved and limited conversation to collaborators Aug 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug 🐛 Something doesn't work
Projects
None yet
Development

Successfully merging a pull request may close this issue.