2
votes

I've just started a new project to develop an application with angular 2 and type script with visual studio 2015 ( update 3) but I got an error : "tsc.exe exited with code 2". when I open my project properties I can't config typescript from there and the error is "one or more tsconfig.json files detected." enter image description here I think maybe the reason is bunch of tsconfig.json files in node_modules sub folders so I excluded the node_modules folder in my tsconfig.json but it seems VS can not find and use my tsconfig.json. Actually after some hours wasting my time correcting this now I have no idea how to fix this and run a simple angular 2 project with typescript in visual studio. any idea about how to solve this problem is appreciated.

1
Did you check the detailled output? Visual Studio > Tools > Options > Compile and Run and set the MS Build Project output to detailled. Now build once again and check if you can get some more details out of the output. I had that error multiple times before - appeared mostly because Visual wanted to compile 3rd party angular libs, although I excluded them via my tsconfig file.. - fen89
@fen89 I want to exclude them with my tsconfig but the problem is that vs can not find my tsconfig and I think the problem is multiple tsconfigs exists in the angular libs. - akhibing

1 Answers

0
votes

Similar to error described here: https://github.com/Microsoft/TypeScript/wiki/Common%20Errors

Check that your file encoding is UTF-8.