0

Webstorm: v10.0.3
TypeScript: v1.5.0.Beta
Nodejs: v0.12.3

The issue is the Compiler Option: "--emitDecoratorMetadata"
(which you need for Angularjs2 & TypeScript)

Two ways to transcompile:
1) GUI: Webstorm|Settings|Languages & Frameworks|TypeScript: "Command line options". Using the "--emitDecoratorMetadata" compiler option results in the compiler NOT starting.
2) CMD Line: compiling with tsc.exe from the command line using this compiler option does work, the compiler starts and runs without errors.

2 Answers 2

2

I have the same issue, please see this post for more information.

I'm looking forward to v10.0.4 in that case.. ;)

In the meanwhile you could use a file watcher as a workaround. That's more or less the same as calling the compiler from the command line (your second option), just that it will be executed automatically as soon as the files change:

  • Settings / Tools / FileWatchers
  • Add a new one, name it TypeScript 1.5 Compilation or something like that
  • Use following settings:
    • Select Immediate file synchronization
    • Program: C:\Users\Peter.Sample\AppData\Roaming\npm\tsc.cmd (or where ever your TS 1.5 compiler is located)
    • Arguments: -emitDecoratorMetadata -m commonjs -t es5 --sourceMap $FilePath$

That should do the job for the moment. You might however be missing the compiler messages/warnings within the dev. environment while coding.

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

Comments

1

https://youtrack.jetbrains.com/issue/WEB-16678

The issue is fixed in v10.0.4 and v11 EAP-- wait till it will be released.

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.