Node.js Code Completion problem

Hi,

Per this link (http://blog.jetbrains.com/webide/2012/03/attaching-the-sources-of-node-js-core-modules/), I've tried to set up code completion for NodeJS in WebStorm 5.0.4. Unfortunately, all I get when I hit Ctrl-Space is "No suggestions". Here's what I've got so far: I started with an empty project.

I configured NodeJS as in NodeJSConfig.png (see attached for this and subsequent files).
I've configured the usage scope correctly (I think) as in NodeJSUsageScope.png.
I've got the Node.js Core Modules installed as a library as in NodeJSLib.png
Yet, when I try to code complete, I get nothing (NodeJSNoComplete.png).

Now, a few important points:

* I downloaded the sources via WebStorm. So I was using the unzipped sources that WebStorm downloaded
* Figuring maybe there was something off with the download, I reconfigured the library manually, pointing it at the files (instead of using a download). Still nothing.
* I've tried Invalidating the Cache several times to no avail.
* Also tried updating the NodeJS plugin, on the off chance that might be the problem. No luck there.

Any ideas? Is there something I'm missing?

As an addendum, I find that if I do not require() anything in, I do get code completion. That is
http.createServer() comes up as a Ctrl-Space option as long as I don't have the line
var http = require("http");
first. Weirder and weirder.



Attachment(s):
NodeJSNoComplete.png
NodeJSLib.png
NodeJSUsageScope.png
NodeJSConfig.png
3 comments
Comment actions Permalink

Please position caret inside 'http' string in "require('http')" method call and try to navigate to definition (Ctrl+B). Will you be navigated to http.js in "Node.js v0.8.15 Core Modules" library?

0
Comment actions Permalink

That seemed to be the problem! When I hit Control-B, it took me to an older version (I had downloaded the sources for Node 0.8.8 as well). Once I removed the Node.js v0.8.8 Core Modules library from my list of libraries, Control-B picked up the right http.js file. And autocomplete came back on-line!

Thank you, Sergey!

0
Comment actions Permalink

Found it! Two Node.js Core Modules libraries clash with each other.
Fixed. Thanks!

0

Please sign in to leave a comment.