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

v1.0.0-beta.46 fails to compile #11285

Closed
1 task done
talha131 opened this issue May 8, 2018 · 11 comments
Closed
1 task done

v1.0.0-beta.46 fails to compile #11285

talha131 opened this issue May 8, 2018 · 11 comments
Assignees
Labels
bug 🐛 Something doesn't work

Comments

@talha131
Copy link

talha131 commented May 8, 2018

  • I have searched the issues of this repository and believe that this is not a duplicate.

Expected Behavior

To work.

Current Behavior

Failed to compile.

Steps to Reproduce (for bugs)

  1. Use create-react-app with typescript to create a new project
yarn global add create-react-app
create-react-app my-app --scripts-version=react-scripts-ts
cd my-app
  1. Install v1.0.0-beta.46
yarn add material-ui@next
  1. Add any material-ui component to src/App.tsx
...
import AppBar from 'material-ui/AppBar';
...
                <AppBar position="static" />
  1. Do yarn start

Error you get is

Failed to compile.
./node_modules/material-ui/styles/withStyles.js
Module not found: Can't resolve '@babel/runtime/core-js/map' in '/Users/talha/Repos/temp/my-app/node_modules/material-ui/styles'

Context

Your Environment

Tech Version
Material-UI ^1.0.0-beta.46
React ^16.3.2
@isitrita
Copy link

isitrita commented May 8, 2018

Submitted same issue in same time #11286

@oliviertassinari
Copy link
Member

oliviertassinari commented May 8, 2018

Try installing @babel/runtime or using v1.0.0-beta.45. I have forgotten about it :/.

@oliviertassinari oliviertassinari added the bug 🐛 Something doesn't work label May 8, 2018
@r0ughnex
Copy link

r0ughnex commented May 8, 2018

As @oliviertassinari stated npm install @babel/runtime fixed the problem for me.
PS: You don't have to switch back to v1.0.0-beta.45.

@bluepeter
Copy link

Try installing @babel/runtime or using v1.0.0-beta.45.

v1.0.0-beta.45 has the same issue.

@HarryCaveMan
Copy link

HarryCaveMan commented May 9, 2018

I have been having this issue in v1.0.0-beta.44/43 also. I think it's worth noting that I was not having this issue until about 3 hours ago (nearly the same time as the OP), when I cleaned out node_modules and did a fresh yarn install, Is it possible that something changed with the babel package MUI is using? Installing @babel/runtime worked for me. Also, one thing I noticed before I came across this workaround was that node_modules had babel-runtime/core-js and not babel/runtime/core-js.

@oliviertassinari
Copy link
Member

I'm moving the next tag from beta.46 to beta.45 waiting for the beta.47 release to fix the problem.
npm dist-tag add [email protected] next.

@sterkhedkar

This comment has been minimized.

@sli
Copy link

sli commented May 9, 2018

I encountered this issue last night and it didn't go away even when I switched to beta.41 and cleared my lockfile and node_modules directory. Really bizarre, but I can confirm that installing @babel/runtime as a dev dependency fixes the issue.

@oliviertassinari
Copy link
Member

I'm releasing v1.0.0-beta.47 with the fix. Next release will be v1.0.0-rc.0.

@gaoxuerong
Copy link

i had the same problem, but it was solved after updating the Material-UI's version .
npm install @material-ui/core https://material-ui.com/getting-started/installation/

@TdfGomes
Copy link

For me it worked with version 1.5.0 but did not worked with 1.51.
So I downgrade it to that seems to more stable or am I wrong?

@mui mui locked as resolved and limited conversation to collaborators Aug 22, 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

No branches or pull requests

10 participants