Fabien Huet

Fabien
Huet

Web ninja //
CTO on demand

Home Github About me

🐛 TypeScript "Cannot find module './myFile..." for .scss, .less, images files, wasm...

in TypeScript, JavaScript

If you use Babel, Rollup or any compilation/bundle tool, you probably have plugins that transform your .jpg, .scss, .js, .wasm… TypeScript is only able to import files that export something explicitly. So, this error may pop in your editor when you write something like import './myStyles.scss'.

Continue reading