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.

0
5 comments

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

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

0

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

2

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

I can confirm this works. 

I wanted to hide node modules from file tree, but instead of just turning it off in kebab menu I added it to ignore list mentioned above.

 

Thanks!

0

Please sign in to leave a comment.