Mark Directory As...

In an attempt to speed up indexing, I attempted to exclude the node_modules library root (this is from Angular CLI).  Now the app doesn't work because it "cannot find module systemjs-builder."  This is a directory within the node_modules library root.  When excluding other directories, I can un-exclude them by right-clicking on them and selecting "Mark Directory As...Cancel Exclusion."  There is no such option when I right-click on node_modules library root any more.  In fact, there is no "Mark Directory As..." at all any more.  What have I done and how can I fix it?  The code is here:


Un-excluding node_modules works fine for me. Please can you provide a screenshot that shows up the issue (missing "Mark Directory As..." ) plus your idea.log?


Wow, Elena, you're so quick to respond to concerns - thank you!  Here's the screenshot:

As far as the idea.log file, where would I find that?  This folder is not inside my WebStorm Projects folder.  I downloaded the Angular CLI and have been using WebStorm to manipulate that file; I didn't create it in WebStorm.


thank you! This option is not available because your node_modules folder is set up as JavaScript library... But you can still remove exclusion in Preferences | Directories:


Anyway, it's strange, as 'Exclude' filter doesn't work for javascript libraries - those libraries that are enabled are always indexed, even if containing folder is excluded from project. So, WebStorm should be able to find the module despite of exclusion


Any idea how to fix this?  Can you get the application to run?


I un-excluded everything except the tmp file, but the project is still reporting that it can't find systemjs-builder,  I don't believe anything else has changed since the application was last working.  Here's the screenshot:


 It can't have any relation to excluding folders/setting up libraries, it must be a problem with your project setup that can't be resolved on IDE side...

Excluding a folder only affects indexing (completion/type hinting/etc.) in WebStorm. It has absolutely on impact on running your application


Your project works for me:




Was the original concern addressed: 

    In fact, there is no "Mark Directory As..." at all any more  


I'm having the same problem with my node_modules directory


This option is not available because your node_modules folder is set up as JavaScript library... But you can still remove exclusion in Preferences | Directories

Hello, I'm having a similar issue, I opened to discuss.

I made sure my node_modules is unchecked under Settings -> Languages & Frameworks -> Javascript -> Libraries, but I still cannot unselect Excluded for it under Settings -> Directories. When you click it, for a split second it unselects (and you see a little spinner), but then immediately reselects. Like it really doesn't want you to do that :-).

Thanks for any ideas.


We have a similar problem with the "dist" directory being auto-excluded and unable to unexclude it. 

Only on certain projects though, which makes me suspect its doing some kind of (wrong) heuristic to decide whether it should be excluded or not - which of course is why you need to be able to override things ! 

It looks like the issue is the webpack.conf which specifies dist as the output path. 

I understand why that makes sense to auto-ignore the dist file, BUT not allowing it to be overridden is just painful, especially with no way to understand WHY it won't allow you to do it. 

The workaround seems to be ... delete your webpack.config file, and open the project, then you can restore it once the project is open (painful!), do this each time you start webstorm


Or probably a less painful workaround is just to disable the webpack support inside jetbrains and use it at the command line .... (Preferences / Languages / Javascript / Webpack and remove the config file setting)


WebStorm does auto-exclude webpack output folder from indexing for better performance... Removing webpack config reference from Preferences / Languages / Javascript / Webpack should help.



BTW, can you check if the issue persist in 2018.2 EAP? fix should make the auto-exclusion more smart


I don't have 2018.2, only 2018.1.4 

I think the problem is not solved by making the auto-exclusion smarter, it would be solved by 

a) making WebStorm's choices visible - how many other people have struggled for hours before stumbling upon the right forum post trying to figure out why some directories can be Unexcluded and other's can't.  At the very least when I try and unexclude it, there should have been a message that says so, rather than an absence of UI. This kind of unreported "smart" behavior is one of the annoyances of WebStorm that I've encountered before. 

b) Never making "smart" decisions without giving us a (findable) way to override them when - as is inevitable - we encounter cases where the "smarts" get it wrong. 

This wasted a good couple of hours of crucial development time yesterday (first finding this post, and then figuring out that it was this obscure line in the webpack config to change), and I'm sure everyone else reporting similar bugs has wasted similar amounts of time.  If each developer hits one or two of these kinds of things, then that more than balances any savings by WebStorm being "smart" and obscure. 


OK, we'll add a notification about this in 2018.2


Please sign in to leave a comment.