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

build error #10

Open
sirawatGG opened this issue Sep 17, 2018 · 4 comments
Open

build error #10

sirawatGG opened this issue Sep 17, 2018 · 4 comments

Comments

@sirawatGG
Copy link

I cloned the project, then yarn install, and yarn start.

I got Module ./node_modules/material-ui/styles/withStyles.js
not found: Can't resolve '@babel/runtime/core-js/map' in 'typescript-react-template/node_modules/material-ui/styles'

I solved above error by installing @babel/runtime and upgrading to material-ui@1.0.0-beta.45

However I got node_modules/material-ui/index.d.ts
(47,55): Type 'keyof T' does not satisfy the constraint 'string'.
Type 'string | number | symbol' is not assignable to type 'string'.
Type 'number' is not assignable to type 'string'.

then I solved above by adding "keyofStringsOnly": true in compilerOptions

Now I struck with
Argument of type 'CSSProperties' is not assignable to parameter of type 'Record<"all" | "left" | "right" | "font" | "clipPath" | "filter" | "marker" | "mask" | "resize" |...'.
Type 'CSSProperties' is not assignable to type 'StyleRulesCallback<"all" | "left" | "right" | "font" | "clipPath" | "filter" | "marker" | "mask" ...'.

@ricardasjak
Copy link

ricardasjak commented Oct 5, 2018

Same here. Initial setup, causes error

Failed to compile
./node_modules/material-ui/styles/withStyles.js
Module not found: Can't resolve '@babel/runtime/core-js/map' in 'C:\Projects\typescript-react-template\node_modules\material-ui\styles'

Windows 10 x64, node 8.11.1

@nemethmik
Copy link

Exactly the same issue here, too :-(
ts-loader: Using typescript@2.9.2 and c:\Users\nemet\tiva11\typescript-react-template\tsconfig.json
No valid rules have been specified for JavaScript files
No valid rules have been specified for TypeScript files
Failed to compile.
./node_modules/material-ui/styles/withStyles.js
Module not found: Can't resolve '@babel/runtime/core-js/map' in 'c:\Users\nemet\tiva11\typescript-react-template\node_modules\material-ui\styles'
Have you, Friends found a solutions?
Thank you, Miklos

@albertocorrales
Copy link

Same issue here. The source code looks great, but I'm not able to build it. I have the same error as for the previous comments.

@michaelrivet
Copy link

michaelrivet commented Jun 21, 2019

Looking here it seems the dependency of "material-ui": "^1.0.0-beta.30" is causing the issue.

babel/babel#9026 (comment)

I switched to @material-ui/core at version 4.1.1 and it corrected the issues, granted I had to rip out all the dependencies of material-ui in the tsx files.

I planned on using the repo as a template and starting my App from scratch, so this worked fine for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants