WebStorm 2017.2.3. False "Module is not listed in package.json". It isn't reading my package.json.

I am getting "Module is not listed in package.json" waring for all the imports listed in my package.json.

They most definitely are listed in the package.json of this project...I see them there. dependencies and devDependencies.

It's as if the IDE is not reading my package.json file. Any suggestions?


haven't heard of such issues. Is your package.json located in your project root folder? Do you have any symlinks in the project path?  Can you recreate the issue in a new project?


No, I do not see it in other projects. Is there someway to have it re-scan or recreate the project info for this one project?


No... Please provide the project so that I can advise on fixing the issue


It works as expected when I open it with WebStorm on my other machine. It isn't the code in this case...it's something wonky with the settings for this project on this particular computer. Hmmm..


Could you please provide your settings (File > Export settings) and your project (or at least a screenshot of project structure, package.json, screenshot of the error)?


Same problem here. Happened after one of the webstorm updates.

I can provide settings.jar, where to send it?


I've seen the same problem in PhpStorm  2017.2.1 and 2017.2.4. I also had the error 'unresolved function or method require'.

These steps cured both, but I'm not sure if all steps are necessary, steps 2 and 3 might be enough:

1. Settings -> Languages & Frameworks -> Javascript -> Libraries:  add 'Frameword Type: Node.js Core Modules'

2. Settings -> Node.js and NPM -> Enabled 'Node.js Core Library'

3. File -> Invalidate Caches / Restart


After applying the three steps mentioned in my previous post, PhpStorm stopped recognizing methods on my imported vue object, so I ended up deleting the '.idea' directory and re-configuring the project from scratch. Now everything's working.


Please sign in to leave a comment.