lomboboo
lomboboo

Reputation: 1233

WebStorm 2016.3.2 "Missing import statement"

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?

Upvotes: 4

Views: 4579

Answers (1)

Carl Napier-Cook
Carl Napier-Cook

Reputation: 53

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

Upvotes: 3

Related Questions