问题描述
我遇到了一个问题,即某些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:
- 创建项目,选择 NodeJS和NPM 。
- 选择下一步,附上,点击完成。
-
在app.js中,在宣布app之后添加以下行:
- Create a project, choose NodeJS and NPM.
- Choose next, the project detail snapshot is attached and click finish.
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.
推荐答案
这是一个已知错误,请关注进行更新。
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()未解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!