Not seeing node_module dependencies

Hi!

I'm using Intellij IDEA Ultimate 2019.3 with NodeJS Plugin 4.2, mostly default settings, and am currently following this tutorial: https://www.valentinog.com/blog/babel/

The editor gives me a warning saying "module is not installed" :

Which is odd, because it is installed in the node_modules folder at root, and listed as a dependency in the package.json file:

Following Intellij IDEA's tip to "Run npm install" does not help, although the command runs successfully:

/usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js install --scripts-prepend-node-path=auto
...
Process finished with exit code 0

What is odd is that the node_modules is not showing in the project folder view. I have checked that the setting "Show Excluded Files" is on.

4 comments
Comment actions Permalink

What's odd is that when I add a dependency intellij idea gives me suggestions from the node_modules folder:

But, afterwards, it says that its not installed..

0
Comment actions Permalink

Could you share your project's `.idea` folder and your log folder zipped (Help > Compress Logs and Show in ...)?

0
Comment actions Permalink

please also make sure that node_modules is not added to Ignore files and folders list in Preferences | Editor | File Types

1
Comment actions Permalink

Oh no! I had forgotten about that Elena, yes I had added node_modules to Preferences > Editor > File Types > Ignore files and folders ...

When I removed node_modules from this list, Intellij IDEA stopped complaining about module not being installed, allowing me to go to declaration if needed.

 

Case resolved ... Thanks!

1

Please sign in to leave a comment.