2

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?

1 Answer 1

4

--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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.