Visual studio TypeScript error "Unable to compile modules if the '--module' flag is not specified."

When I try to compile and export the typescript module, I get this error. I read several articles, but no one fixed my problem, I am using VS2015 Exterprise, Thanks

+5
source share
2 answers

Visual Studio TypeScript error "Unable to compile modules if the" -module "flag is not specified.

Right-click the project and select "Properties." Click on the TypeScript page in the project properties, and then select your module (I personally recommend commonjs with webpack for an interface / browser or as for nodejs)

+2
source

I ran into this problem a while ago and probably your visual studio project file is corrupted. This may be due to a Visual Studio error or because you used a confused project file.

I described that I fixed this for me in this post .

0
source

All Articles