This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
16 Replies Last post: Jan 23, 2014 4:47 PM by Thomas Mo  
Christopher Scott Newbie 6 posts since
Jan 12, 2014
Currently Being Moderated

Jan 12, 2014 1:47 AM

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?

Elena Pogorelova Apprentice 973 posts since
Oct 5, 2011
Currently Being Moderated
Jan 12, 2014 4:10 PM in response to: Christopher Scott
Re: Adding new custom JavaScript libraries

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?

Elena Pogorelova Apprentice 973 posts since
Oct 5, 2011
Currently Being Moderated
Jan 13, 2014 1:31 PM in response to: Christopher Scott
Re: Adding new custom JavaScript libraries

Hello!

 

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

Elena Pogorelova Apprentice 973 posts since
Oct 5, 2011
Currently Being Moderated
Jan 14, 2014 2:31 PM in response to: Christopher Scott
Re: Adding new custom JavaScript libraries

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

Elena Pogorelova Apprentice 973 posts since
Oct 5, 2011
Currently Being Moderated
Jan 14, 2014 7:35 PM in response to: Christopher Scott
Re: Adding new custom JavaScript libraries

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

Thomas Mo Newbie 5 posts since
Jan 14, 2014
Currently Being Moderated
Jan 14, 2014 7:59 PM in response to: Christopher Scott
Re: Adding new custom JavaScript libraries

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

Michael  Teper Novice 392 posts since
Aug 21, 2002
Currently Being Moderated
Jan 21, 2014 12:50 AM in response to: Christopher Scott
Re: Adding new custom JavaScript libraries

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

Elena Pogorelova Apprentice 973 posts since
Oct 5, 2011
Currently Being Moderated
Jan 22, 2014 5:48 PM in response to: Michael Teper
Re: Adding new custom JavaScript libraries

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!

Thomas Mo Newbie 5 posts since
Jan 14, 2014
Currently Being Moderated
Jan 22, 2014 6:28 PM in response to: Elena Pogorelova
Re: Adding new custom JavaScript libraries

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.

Elena Pogorelova Apprentice 973 posts since
Oct 5, 2011
Currently Being Moderated
Jan 23, 2014 4:44 PM in response to: Thomas Mo
Re: Adding new custom JavaScript libraries

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

Thomas Mo Newbie 5 posts since
Jan 14, 2014
Currently Being Moderated
Jan 23, 2014 4:47 PM in response to: Elena Pogorelova
Re: Adding new custom JavaScript libraries

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.

Liubov Melnikova JetBrains 233 posts since
Nov 8, 2013
Currently Being Moderated
Jan 21, 2014 8:49 PM in response to: Christopher Scott
Re: Adding new custom JavaScript libraries

Yeap, we are doing it.

But you can create the request here:

 

https://intellij-support.jetbrains.com/anonymous_requests/new .

More Like This

  • Retrieving data ...