Bai Bing Bai Bing - 6 months ago 104
Javascript Question

IntelliJ IDEA - nodejs plugin - passport.initialize() not resolved

I met an issue that some of the nodeJS module functions are not resolved but others are fine. Here is my step to reproduce this issue:

  1. Create a project, choose NodeJS and NPM.

  2. Choose next, the project detail snapshot is attached and click finish.

  3. In app.js, add the following line after app being declared:

    var passport = require('passport');


  4. You should see the initialized() has underscore indicating "Unresolved function or method initialized".

I'm using the latest version of IntelliJ IDEA 2016.3.4.

I've read the relevant question, but it's not fit in my scenario.
Please be noted that only passport module have this issue.

Answer Source

It's a known bug, please follow WEB-18469 for updates.

As a workaround, please, try downloading passport TypeScript community stubs: File | Settings | Languages & Frameworks | JavaScript | Libraries, press Download..., choose passport from the list

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download