WebStorm: Node.js core module sources (How to configure?)

What is the "node.js core module"?

How do I cofigure the "node.js core module" in WebStorm? See red cirled #2 in snap shot below:

editor.png

I have node v0.12.7 installed globally on my computer.

Using:
Mac OS 10.10.5
WebStorm 10.0.4

2 comments
Comment actions Permalink

I meant to post this reply to a different question I asked.


SOLVED MY QUESTION


I am able to launch the node server with these 2-changes:



  1. I changed "__dirname__" to "__dirname". That is , I removed the two trailing underscores.
  2. Invoke the server with "bash server.sh" (instead of simply "server.sh").
0
Comment actions Permalink

This can be done in Preferences -> Languages & Frameworks > Node.js and NPM, by pressing Configure button. When you press it, WebStorm will try to download the source code of Node.js core libraries, like fs, cluster, path, tty, util, etc., to enable completion/type hinting in editor.
You may find this blog post helpful (though the UI there is not up-to-date): http://blog.jetbrains.com/webide/2012/03/attaching-the-sources-of-node-js-core-modules/. See also
http://confluence.jetbrains.com/display/WI/Getting+started+with+Node.js#GettingstartedwithNode.js-Initialconfigurationforanewprojectfromexistingfiles

1

Please sign in to leave a comment.