IDE cannot resolve directory on require.js external paths

Hi,

in my require.config - part, i use external libraries to pull them in via require.js. But WebStorm is showing the external urls as an error. Has anyone an idea whythis happens or how to configure WebStorm to recognize these libs?

here is the code:

 
require.config({
    baseUrl: "",
    
paths: {
        "knockout": "//cdnjs.cloudflare.com/ajax/libs/knockout/3.3.0/knockout-debug",
        "lodash"
: "//cdnjs.cloudflare.com/ajax/libs/lodash.js/3.4.0/lodash.min",
        "moment"
: "//cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min",
        "jquery"
: "//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min",
        "semantic"
: "//cdnjs.cloudflare.com/ajax/libs/semantic-ui/1.11.1/semantic.min",
        "knockout-amd-helpers"
: "scripts/lib/knockout-amd-helpers",
        "text"
: "scripts/lib/text"
    
}
});


All links to the external ressources are marked as "cannot resolve directory...". I added a screenshot because this is somewhat hard to explain.

This is not an issue with my program, it all works fine. Just WebStorm is showing these as an error. Which it should'nt in my opinion (WebStorm 9.0.3).



Attachment(s):
require-problem.png
2 comments
Comment actions Permalink

URLs in require() are not currently supported. Please vote for

https://youtrack.jetbrains.com/issue/WEB-2467.
The only way to get rid of the error is suppressing error highlighting  for this file: click the Hector icon in the lower right corner and then  move the slider to change the Highlighting level to None. See http://www.jetbrains.com/webstorm/webhelp/changing-highlighting-level-for-the-current-file.html 
0
Comment actions Permalink

Thanks for the answer, disabled error checking for that specific file.

0

Please sign in to leave a comment.