Autocomplete does not work for Node.js core modules

Using WebStorm 10.0.4, autocompletion for Node.js 0.12.7 does not work.

These are my settings / errors in WebStorm:

Screen Shot 2015-09-29 at 21.06.12.png

Screen Shot 2015-09-29 at 21.02.41.png

Screen Shot 2015-09-29 at 21.02.59.png

Screen Shot 2015-09-29 at 21.03.13.png

I also ran "Invalidate Caches / Restart".

The problem occurs in multiple projects.

6 comments
Comment actions Permalink

Seems something is wrong with 'Node.js 0.12.7 Core Modules' library - most likely, no files are attached to it. Please select this library and
press 'Edit...' - what can you see? If it's empty, I'd suggest removing this library, restarting WebStorm and downloading Node.js core modules again using 'Configure...' button in Node.js and NPM settings

0
Comment actions Permalink

Hi Elena,

I have the same issue as Alexander (or at least the same symptoms). I did as you said but nothing changes for me.
The Edit Dialog looks as in this picture:
node_library.PNG

I've already tried multiple version of node.js (0.12.7 as Alexander, but also the new 4.x builds)
Revalidating, restarting and even reinstalling did not help.

Cheers,
Fabian

0
Comment actions Permalink

Thanks, Elena this did the trick :)

0
Comment actions Permalink

Does your problem also concern to core modules ('fs', etc.) completion/resolving? Or, is it about providing completion for your local node_modules?

0
Comment actions Permalink

It's about core modules. The local node_modules resolve just fine.

0
Comment actions Permalink

I found a workaround, in case anybody else has the sam issue:

I opened the Library setting for the Node.js Core modules, removed every file from there, applied.
After that I went to the settings again and manually added the content of Node's lib folder to the library (not as a folder, but as individual files - adding it as a folder messes with the autocomplete for require)

0

Please sign in to leave a comment.