Adding new custom JavaScript libraries

I'm using the protractor test framework for AngularJs, and I've added the libary as a custom JavaScript library. However, all the methods are still showing as unrecognized in WebStorm. Is there something I'm missing besides just adding a reference to the protractor.js file in the Library UI?

16 comments

Attaching the library in Settings/javascript/libraries and enabling it for the project should be enough. Can you provide a code snippet that shows up the problem with protractor methods not being resolved? Or, even better, a sample project that to see what your configuration looks like?

0

Hello!

after installing the missing dependencies (including protractor) locally using npm install I have these methods resolved...

0

I already have protractor installed and working. So something else is going on here. How can I figure out what it is?

Did you install globally (I did)? How did you reference the protractor js in your JS Library setting? I just pointed it direclty to the protractor.js file in my /usr/local/lib/node_modules/protractor/lib directory. I also tried pointing at the whole lib directory.

0

I installed them locally, so that all files are in my project folder. And I didn't add any custom libraries, as the needed files are already in the project root (as a result of npm install) and thus are available to the parser

0

Are you saying that library dependencies must be installed locally to work? If not this seems like a bug.

0

Hmm.... No. I just say that they work for me when being installed locally. But you can install them globally if you like and add the corresponding node_modules folders as javascript libraries

0

The problem is that it doesn't seem to be working for me. Any suggestions (besides having to install locally)?

0

I have the same problem.
I had Knockout 3.0 intellisense working fine in 7.01, but when I updated to 7.03 all intellisense for the knockout library dissapeared.
The external library is set to Project scope, and the file included is the knockout-3.0.0.debug.js.

This works with no problems in v7.01. Just to check I tried installing knockout as an external library on my laptop where I'm still on v7.01, and it works right away. haven't gotten around to trying to update it to 7.03 since I need the intellisense :)

-Thomas

0

I am new to PhpStorm (having used IDEA and ReSharper), but in the latest 7.1 EAP this does not work at all. I added knockout.3.0.0.min.js to libraries, but none of the knockout methods are resolved.

-Michael



Attachment(s):
Screen Shot 2014-01-20 at 12.50.28 PM.png
Screen Shot 2014-01-20 at 12.49.39 PM.png
0

Does JetBrains support monitor these forums, or is there a more direct route to get them engaged?

0

1. works fine for me using WebStorm 7.0.3. + knockout-2.2.1.debug.js downloaded using JavaScript/Libraries/Download...
2. doesn't work at all for knockout-3.0.0.js (minified) - nothing is resolved
3. works (somehow) for knockout-3.0.0.debug.js - functions are resolved, navigation works as expected, but 'ko' marked as unresolved variable!

0

Something must hva happened with this part of the software between 7.01 and 7.03 since it works as expected in 7.01, but not when using 7.03?
I can get it to highlight methods from ko, but there is noe intellisence on anything ko related, and the ko object is marked as unknown.

0

Logged as http://youtrack.jetbrains.com/issue/WEB-10723, please vote
Note that we recommend using debug versions of libraries - they work much better, and navigation is possible

0

Well, I'm using an non minified debug version of Knockout 3, and I'm not able to get intellisence on the Knockout methods in 7.03.
The same file in 7.01 works fine, and as expected.

0

Please sign in to leave a comment.