4
votes

So I have WebStorm javascript project powered by Systemjs and JSPM. Little annoying thing is that Webstorm can't see global System object, so marks it as Missing import statement in the config.js file.

I followed a tip:

When using libraries that define their own global symbols outside 
their visible JavaScript code (e.g. describe() in Mocha), it is   
recommended that you add the corresponding TypeScript type definition 
file as a JavaScript library in Preferences | Languages & Frameworks | 
JavaScript | Libraries.

And added system.js file from jspm_packages to the Javascript libraries in the Webstorm settings of my project.

enter image description here

But it didn't help. Any idea what I am missing?

1

1 Answers

3
votes

This worked for me.

  1. Select the mocha library in the list
  2. Click the "Download ..." button on the right side.
  3. Search for mocha
  4. Click the "Download and Install" button.

Download Library window