webstorm中使用express的方法出现unresolved function or method

问题描述 在Webstorm中使用express的方法时出现unresolved function or method get() 解决办法 官网给出的方法 这些属性是在运行时动态添加的,并没有在Express模块中定义,所以Webstorm无法使用静态分析而报错。可通过安装@types/express解决。 光标选中require('express')中的express,然后Alt+Enter,
相关文章
相关标签/搜索