WebStorm 11.0.3 not completing or recognizing node_modules

I made a simple test project illustrating the issue: https://github.com/Jason-Abbott/webstorm-test

This is the entirety of its code:

The file it depends on looks something like this:

exports.httpStatus = {
     ok: 200,
     temporaryRedirect: 301,
     permanentRedirect: 302,
     unauthorized: 401,
     forbidden: 403,
     notFound: 404,
     internalError: 500,
     unsupported: 501,
     badGateway: 502,
     unavailable: 503

I have spent a few days reading issues and trying JSDoc permutations without luck. The completion works perfectly if I copy the dependency out of node_modules into the project itself. I'm pretty sure this worked fine before a recent update, though perhaps that's coincidence or my imagination. Advice is appreciated. :)


P.S. The issue is unchanged with the latest WebStorm 12 EAP
2016-01-03 13_01_14-webstorm-test - [D__dev_Trail Image_webstorm-test] - ..._index.js - WebStorm WS-.png


Hmm... I must be mising something, but is "@trailimage/enum" a valid name? I get NPM errors when installing this module


As just a test, I didn't put it in NPM but the package.json references it correctly to pull from GitHub. You can clone the test project repo and npm install or, if it's easier, I can attach the files here.


I've tried this with https://github.com/Jason-Abbott/webstorm-test - 'npm install' doesn't work for me because NPM reports '@trailimage' to be invalid name


It sounds like your npm version isn't current. The problem affects any module so you can use any you like. It's probably not too important to discuss further here since there's an active ticket about it now: https://youtrack.jetbrains.com/issue/WEB-19683


It sounds like your npm version isn't current.

node -v v5.1.1, npm -v 1.4.4. And which one do you use?

Have you solved this issue? I'm having it now...

The only way to get Webstorm to use the modules to regognize my functions (which are alright when I run it but WS keeps telling me that they're 'unresolved') is to use require('..\\modulename'), but then I have to change it back to run it with node; it runs alright but WS insists that without the ..\\ all my code is invalid.

Do you know of any way to solve this?


what issue are you talking about? Scoped modules (prefixed with '@') are recognized since WebStorm 2016.1...


Ah, I guess my noobness is at fault here. I'll try to learn how to do that.


Please sign in to leave a comment.