I noticed that whenever I switch a branch in Git
, Resharper
will start throwing hundreds of errors in TypeScript
. The only way to resolve this is to delete node_modules
folder and run npm install
again. This is a bit of a burden doing it every time as I am switching between branches and creating new ones whenever there is a task to be worked on.
Has anyone had a similar issue and how did you resolve it without reinstalling node modules? I am using ReSharper Ultimate 2016.3.2
(January 26, 2017 build).
UPDATE:
Let me update this question a bit. ReSharper will mark the errors where they do not exist. Even in this state the TypeScript code can be compiled without any problems. Pressing CTRL+SHIFT+ALT+8 disables ReSharper analysis for that TypeScript file and we are back to normal Visual Studio (as if ReSharper was not installed). The issue is not with NPM modules or Git settings. The problem is somewhere with how ReSharper tries to pickup the branch switching. Something confuses it.