Unresolved function or method from any CDN JS file

Whenever I load a JS file via a CDN, I get the ‘unresolved function or method FUNCTION_NAME_HERE’. It's extremely annoying as it ruins the flow of the code and highlights any of the functions or methods that stem from the CDN file. Is there any way to fix this? I have the same issue with PhpStorm.

 

I have tried to invalidate the cache and resetting indexes or whatever it is called. I am using Pop OS 22.04.

0
5 comments
I would like to confirm if you have downloaded the library locally following the instructions provided in this link: Configuring JavaScript Libraries (https://www.jetbrains.com/help/webstorm/2024.1/configuring-javascript-libraries.html#ws_js_external_library_downloaded_from_CDN). Additionally, could you please specify if the script is minified or non-minified?

Thank you.
1

Elena Pogorelova 

Thank you for your reply. I tried following the configuration guide. I double-checked my library settings in WebStorm and I could see that the library from the CDN I am using is installed. 

However, I'm still running into the same issue. I tried invalidating the cache and so on.

The library I am using is leaflet (https://unpkg.com/leaflet@1.9.4/dist/leaflet.js) and it does seem to be a minified version.

0

Unfortunately the compressed obfuscated file can't be used for static code analysis.

Please try installing the type definitions for this library (with npm install --save @types/leaflet) - does it help?

0

Elena Pogorelova 

Thank you so much. It works! 

0
Great! Thank you for the update!
0

Please sign in to leave a comment.