Reputation: 87
I recently upgraded to WebStorm 2016 from WebStorm 9 for debugging my NodeJS projects. But I cannot seem to find any option to enable NodeJS Globals like in WebStorm 9 (I can only enable NodeJS Core).
How can I enable NodeJS Globals and NodeJS Core in WebStorm 2016?
Upvotes: 3
Views: 1338
Reputation: 3006
Try this:
File -> Invalidate Caches/Restart...
PS: You don't need to download the javascript libraries.
Upvotes: 0
Reputation: 31
This sounds like same problem I had (things like require() and exit() wouldn't resolve). Found this on the jetbrains support page and it worked for me:
"'Node.js Globals' library has been merged with 'Node.js Core Modules', and can be enabled in Settings/Languages & Frameworks/Node.js and NPM" https://intellij-support.jetbrains.com/hc/en-us/community/posts/206999855-Node-js-Globals-library-missing-from-10-0-1-?sort_by=votes
Upvotes: 3
Reputation: 93748
res.render is an Express framework method, it's not a part of Node.js core. You need to download the Typescript community stubs for express, express-serve-static-core and serve-static modules to get Express methods resolved: Settings | languages & Frameworks | javaScript | Libraries
, press Download..., choose needed modules from the list
Upvotes: 3