stop indexing node_modules folder ! Follow Dgorbenk Created May 03, 2018 15:09 Hi, How can I stop indexing "node_modules" folder ? It's excluded but still under indexing by Webstorm. Webstorm version is 2018.1.2
seems like restart is required after removing that folder.
I wonder who ever needs auto completion from node_modules directory (usually it has production version, minimized, etc), but thank you for your help !
>I wonder who ever needs auto completion from node_modules directory
Hmm... When you require some library, you normally want the functions defined in it to be available in completion, need to navigate to library definition, etc. This is a typical scenario.
Of course, if everything in your node_modules is an auxiliary stuff used for building/bundling/testing your code, you can safely exclude the folder completely
Thanks for the explanation @Elena. And yeah, I indeed use the libraries I install through npm, please leave that auto-complete in :)
How does intellij differentiate between build and runtime libraries, and correlate that with devDependencies and dependencies respectively?
Does IntelliJ process all folders in node_modules, or just those directly specified in dependencies and/or devDependencies.
What do I have control over aside from all or nothing?
>Does IntelliJ process all folders in node_modules, or just those directly specified in dependencies and/or devDependencies.
only those that are explicitly listed in dependencies and devDependencies are indexed, others are ignored
after some upgrade which happened to webstorm it started to index node_modules folder again.
I do understand what you mean by saying "This is the expected behavior", but I don't want to let the webstorm to check these folders at all. Not for any reason.
As always, these folders are marked as excluded.
Do you need some screenshots to better understand what I'm talking about ?
here is the ongoing indexing process:
the folder I blurred is one from the disabled on the next screenshot with settings.
A checkbox is marked with a Dash (
-) if the corresponding library is defined and enabled on a more detailed level, for example, in a directory or in a file.
You need to clear Enabled checkboxes to disable libraries
I see, thank you.
I don't get this "libraries" config at all. Not possible to add new directories (either adding is disabled or file picker is being open instead of directory picker). Counter-intuitive content where "-" means kinda enabled... this sucks. Rest of the settings are easy to use. Please "don't make me think" when using this part.
I just want Rider to stop indexing node_modules out of scope of the projects inside my solution. The only special thing about my setup is that it is git monorepo with solutions (.sln) for frontend and couple backend services. I frequently get blocked for 2-5 minutes - e.g. can't rename a stupid file! until the indexing is finished.
Could someone point me to some global (not per project) setting that would make every **/node_modules disappear so that Rider can boot up in reasonable time? I already get enough slowdown from Windows and its Defender (exclusion rules did not make a difference).
>Could someone point me to some global (not per project) setting that would make every **/node_modules disappear so that Rider can boot up in reasonable time?
Try adding node_modules to the Ignore files and folders list (https://www.jetbrains.com/help/webstorm/2019.2/creating-and-registering-file-types.html#ignore-files-folders) in Settings | Editor | File Types
But note that ignored files are not indexed and not shown in the Project tree view