casesandberg / react-color

:art: Color Pickers from Sketch, Photoshop, Chrome, Github, Twitter & more
http://casesandberg.github.io/react-color/
MIT License
12.05k stars 922 forks source link

Typescript+react-color => Module not found: Can't resolve '@icons/material/CheckIcon' #818

Closed LevapVeeskela closed 3 years ago

LevapVeeskela commented 3 years ago

image Failed to compile.

./node_modules/react-color/es/components/swatches/SwatchesColor.js Module not found: Can't resolve '@icons/material/CheckIcon' in 'C:\Projects...[myproject]\node_modules\react-color\es\components\swatches'

I installed
"@material-ui/core": "^4.11.3", "@material-ui/icons": "^4.11.2",

and
"@types/material-ui": "^0.21.8", "@types/react-color": "^3.0.4"

and even added declare module '@icons/material/CheckIcon'

but that all don't resolve my problem

my tsconfig.json { "extends": "./tsconfig.path.json", "compilerOptions": { "target": "es5", "lib": [ "dom", "dom.iterable", "esnext" ], "allowJs": true, "checkJs": false, "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "declaration": false, "emitDecoratorMetadata": true, "experimentalDecorators": true, "strict": true, "forceConsistentCasingInFileNames": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react-jsx", "noFallthroughCasesInSwitch": true, "removeComments": true }, "include": [ "src", "src/configs", "react-app-env.d.ts" ] }

LevapVeeskela commented 3 years ago

image I founded problem) I have same path alias in ts.path.config)