Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VS 2015 Angular 2 import modules cannot be resolved

I have created an empty web project and added files using

Angular-cli

https://scotch.io/tutorials/use-the-angular-cli-for-faster-angular-2-projects

I can run the website fine using ng buid/serve but I get below error in editor:

enter image description here

I read somewhere that it is Resharper error in version 9, so I upgraded my Resharper to latest which fixes the problem but it cannot resolve the modules. any suggestions?

Edit: created a new typescript class and it's giving below error

enter image description here

like image 226
Kamran Pervaiz Avatar asked Jun 27 '16 12:06

Kamran Pervaiz


1 Answers

As far as I know, Resharper still doesn't support TypeScript latest versions. It looks like Resharper ignores tsconfig.json file that exists inside src folder. I suggest you try VS Code instead. It's free and has much better support of new TypeScript features.

If you still want to stay with VS 2015, you can configure Resharper not to analyze .ts files. Here is how to do it.

like image 66
Dima Kuzmich Avatar answered Nov 02 '22 06:11

Dima Kuzmich