IntelliJ IDEA - nodejs插件 - passport.initialize()未解析 [英] IntelliJ IDEA - nodejs plugin - passport.initialize() not resolved

查看:947
本文介绍了IntelliJ IDEA - nodejs插件 - passport.initialize()未解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个问题,即某些nodeJS模块功能未解决,但其他功能正常。以下是重现此问题的步骤:

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. 创建项目,选择 NodeJS和NPM

  2. 选择下一步,附上项目详细信息快照,点击完成。

  3. 在app.js中,在宣布app之后添加以下行:

  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 ('护照');

app.use(passport.initialize());

var passport = require('passport');
app.use(passport.initialize());

你应该看到initialized()有下划线表示未解析的函数或方法已初始化。

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

我正在使用最新版本的IntelliJ IDEA 2016.3.4 。

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.

推荐答案

这是一个已知错误,请关注 WEB-18469 进行更新。

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

作为解决方法,请尝试下载护照TypeScript社区存根:文件|设置|语言与框架| JavaScript |图书馆,按下载... ,从列表中选择护照

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

这篇关于IntelliJ IDEA - nodejs插件 - passport.initialize()未解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆