All Passport.js methods are defined as "Unresolved function or method" by WebStorm

Hi.

I was searched much in StackOverflow and JetBrains forums but haven't found yet the answer for me.

Why WebStorm marks all passport.js methods as "Unresolved function or method"?

I have passport.js in project dependencies, my Node.js is enabled and passport.js is installed there as well.





3 comments

Try using Typescript stubs here: in Preferences | Languages & Frameworks | JavaScript | Libraries, press Download..., choose 'passport', press 'Download and Install'

 

5

Elena, thank you a lot, it works.

But it's not obvious that I need to have passport.js (must be in Node.js Libraries) in JavaScript Libraries.

Why it's not working properly without adding it in JavaScript Libs?

0

It's a known issue with resolving methods of exported module instance - https://youtrack.jetbrains.com/issue/WEB-18469

0

Please sign in to leave a comment.