Reputation: 380
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:
In app.js, add the following line after app being declared:
var passport = require('passport');
app.use(passport.initialize());
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.
Upvotes: 1
Views: 219
Reputation: 9177
There is a better way than manually IDE configuration I think, just add passport tying to your dependency.
https://www.npmjs.com/package/@types/passport
npm install --save @types/passport
Upvotes: 0