Unwanted Intellij indexing of node_modules

Hi,

I’m using the community version of Intellij and am in the process of porting a large multi-module Vaadin 14 application to the non-compatibility mode of Vaadin 14.

The build process creates very large node_modules directories and it seems as if Intellij wants to index these files, effectively rendering Intellij useless because it is trying to index so many files - even after hours of indexing.

I have tried ‘excluding’ the node_module folder, but Intellij still wants to index the files. Apparently due to them being listed in package.json. Forums I have found suggest disabling node_modules in ‘Settings | Languages & Frameworks | JavaScript | Libraries’, however the community version of Intellij doesnt have a Javascript option and so these folder cannot be disabled.

Is there some other way to disable this bazillion node files from being indexed? Is it possible to use Intellij community edition with Vaadin 14 on large projects?

Thx.

Hi.

I guess it should work with You can remove/disable the <project_name>/node_modules library in Settings | Languages & Frameworks | JavaScript | Libraries to exclude node_modules completely. as seen as the answer at [intellij support]
(https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000414630-stop-indexing-node-modules-folder-)

  • Mikael

Hi Mikael,

Thanks for the help. I did however already try this and the problem is that the community version of Intellij doesn’t support Javascript so and there is no option “Javascript” under “languages and Frameworks”! See attached screenshot.

I’m not yet convinced this is the problem causing the endless “Scanning files to index…”, but this is the only change I made to my project when porting from Vaadin 14’s compatibility mode to non-compatibility mode.

Franz

18272097.png

Hi.

I actually forgot that it’s not included in CE.
I think you can try pausing indexing and the right click node_modules and from Mark Directory as selecting Excluded.
This should by my knowledge exclude it also from indexing. If not then your best bet is to go to intellij forums.

At least on my project indexing node_modules didn’t loop with CE and was relatively fast.

  • Mikael

Turned out this is an Intellij problem. The logs showed that the file root had changed and that caused Intellij to start reindexing, which erroneously caused the file root to change again, thus causing an endless loop. Had to reinstall Intellij, clear the caches, clean all Intellij files from my project, empty the maven .m2 repository and maven clean my project before the problem went away. Now its back to normal :-).