Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot find module 'csstype'

I'm new in react with typescript. I installed react, react-dom; then installed @types/react, @types/react-dom, everything fine, everything works, except that I get error ERROR in [at-loader] ./node_modules/@types/react/index.d.ts:55:22 Cannot find module 'csstype'. So I looked to the file in this path, and notice that vscode underlines line - import * as CSS from 'csstype'; with red line and marks as cannot find module. I tried yarn add csstype, yarn add csstype -D, did not help. Any idea how fix error? [App works with error].

like image 719
Ramazan Chasygov Avatar asked Apr 06 '18 22:04

Ramazan Chasygov


1 Answers

Using compilerOptions.moduleResolution: "node" should fix it

like image 172
Fredrik Nicol Avatar answered Nov 18 '22 06:11

Fredrik Nicol