I'm getting errors for paths that are correct, using root relative imports in Angular, via this solution. My linter error looks like:
Cannot find module 'header/header.component'.
My tsconfig.json file:
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "app",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
]
}
}
My src/tsconfig.json file:
{
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../out-tsc/app",
"module": "es2015",
"types": [],
"baseUrl": "app"
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}
The project compiles fine, and accepts the import paths, but linter-tslint thinks the paths are wrong.
I am using Angular 6.0.3, and TypeScript 2.7.2.