[Solved] Nodejs/Express: Unresolved function or method Follow
just downloaded latest Webstorm Version and created new empty Project.
After creation i executed: npm init --yes
Added express as dependency in package.json and executed: npm install
Then i've copied this example: https://expressjs.com/en/starter/hello-world.html
I can execute the code but Webstorm shows me this Error:
How can I fix this "error"? I have same issues with pg package
Build #WS-183.4588.66, built on December 5, 2018
JRE: 1.8.0_152-release-1343-b16 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Please sign in to leave a comment.
The problem is that these properties are not defined in Express module - they are added dynamically in runtime. That's why WebStorm can't resolve them using static analysis.
Installing express typings (
@types/express) should make things better: hit
require('express'), choose Install Typescript definitions for better type information.
Thank you! That fixed my issues.
Boss! Thank you Elena , learning about alt+enter was a huge bonus.
it worked! Thank you!
On macOS use opt + enter to do the same.
Thank you! Helped me in Intellij too!