Reputation: 47921
When I tried using the import statement in webstorm with TypeScript enabled I get the error
Error:(14, 1) TS1148: Cannot compile external modules unless the '--module' flag is provided.
However if I add the --module
flag to the TypeScript command line options under "webstorm Preferences -> Languages and Frameworks -> Typescript", I get the compiler cannot start error.
What's the best way to configure this?
Upvotes: 2
Views: 532
Reputation: 93908
--module
option requires module type (either '--module amd'
or '--module commonjs'
)
Please see https://www.npmjs.com/package/typescript-compiler for more information about typescript compiler arguments
Upvotes: 4