Reputation: 3043
I can't get typescript paths to work for VS Code in an Angular cli project.
If you look at https://github.com/gatimus/multiple-test/blob/master/src/app1/app/app.module.ts#L3 throws
[ts] Cannot find module 'shared/shared.module',
even though path is set in tsconfig.app.json
and settings.json
has the line
"typescript.tsdk": "node_modules/typescript/lib/"
Update:
It seems the apps run but VS Code can't find the module. I have version 1.16.1
Upvotes: 3
Views: 1617
Reputation: 11
For anyone still struggling with this, I was having this problem in Atom and it was fixed by following the sym link. (cmnd/ctrl click on the module name that throws the error). This seems to suggest that it is an issue with the IDE and not angular.
Upvotes: 0
Reputation: 3043
Renaming tsconfig.app.json
to tsconfig.json
and updating .angular-cli.json
seems to work.
I am curious though, if the tsconfig file wasn't configurable in angular cli, how would you tell VS Code to use tsconfig.app.json
?
Upvotes: 2