I try to move my project to ts, then this error raise
error TS2307: Cannot find module '~components/common/header/header.vue'.
here is tsconfig.json
{
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"es5",
"es2015"
],
"module": "es2015",
"moduleResolution": "node",
"allowJs": true,
"experimentalDecorators": true,
//"declaration": true,
"noImplicitAny": false,
"noImplicitThis": false,
"strictNullChecks": true,
"removeComments": true,
"suppressImplicitAnyIndexErrors": true,
"allowSyntheticDefaultImports": true,
"baseUrl": ".",
"paths": {
"~": ["./"],
"~assets/*": ["./assets/*"],
"~components/*": ["./components/*"],
"~middleware/*": ["./middleware/*"],
"~pages/*": ["./pages/*"],
"~plugins/*": ["./plugins/*"],
"~static/*": ["./static/*"]
}
}
}
and then, my index.d.ts is an empty file
<!--cmty--><!--cmty_prevent_hook--><div align="right"><sub><em>This question is available on <a href="https://nuxtjs.cmty.io">Nuxt.js</a> community (<a href="https://nuxtjs.cmty.io/nuxt/nuxt.js/issues/c1811">#c1811</a>)</em></sub></div>