typescript-react-template icon indicating copy to clipboard operation
typescript-react-template copied to clipboard

build error

Open sirawatGG opened this issue 7 years ago • 4 comments

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 [email protected]

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" ...'.

sirawatGG avatar Sep 17 '18 04:09 sirawatGG

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

ricardasjak avatar Oct 05 '18 20:10 ricardasjak

Exactly the same issue here, too :-( ts-loader: Using [email protected] 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

nemethmik avatar Dec 12 '18 16:12 nemethmik

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.

albertocorrales avatar Mar 21 '19 11:03 albertocorrales

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

https://github.com/babel/babel/issues/9026#issuecomment-439591799

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.

michaelrivet avatar Jun 21 '19 00:06 michaelrivet