Component or directive matching dx-data-grid element is out of the current Angular module's scope Follow
I upgraded to 2021.1 and am seeing issues with WebStorm telling me that my component is out of the Angular module's scope. This is incorrect. This is a result of an upgrade, before the upgrade this was not an issue. I know I can disable the inspection but thats a bad workaround. Any way to roll back to a previous WebStorm Version until they fix it?
Please sign in to leave a comment.
I also, tried invalidating the cache and restarting, deleting the node_modules and reinstalling, toggling on and off the inspection checkbox in the settings but it still does this.
Did you change your project in any way (upgrade to a new Angular version, for example)?
Sample project the issue can be repeated with would be appreciated
Did not change anything. I simply clicked the WebStorm Upgrade link that pops up from the bottom of WebStorm, then it restarted, I opened this file and now see all these inspection errors?
Can I rollback to a previous version where this wasn't happening? Seems like a bad build or some issues with the inspector.
Previous versions can be downloaded from https://www.jetbrains.com/webstorm/download/other.html
Thank you. It worked. I'd look into the inspector for Angular projects stating they are out of scope when they are not. And I also noticed in the change list Shift-click to select multiple is buggy. Sometimes it selects multiple files and sometimes it just does nothing?
It was interesting,
it really announces an error for me after the update, but there was no problem in the previous version
Attention to your powerful and great team, I wonder why this case has not been resolved after 6 months and it gives an error!
Can you tell us when this error will be fixed so that we know when we should continue our work in this good program?
It can't be fixed as it can't be reproduced on our end
A project the problem can be repeated with would be helpful
I second this. Using Intellij IDEA, similar error also occurs "Component or directive matching mat-form-field element is out of the current Angular module's scope". But i very sure it is within the scope, and running command line ng build produce success building, and no error. So if ng build produce no error, why would IDEA still flag out this error?
Intellij IDEA v2021.2
Unfortunately ( as I mentioned above) we failed to reproduce the problem. Could you perhaps point us to a publicly available project which we could use to reproduce the problem or, if possible, share yours?
I know i'm late to the party, but I just had, and solved, this problem in Webstorm 2021.3.1.
The trick is to right click on the dist folder > Mark directory as > "Not excluded" or "Cancel exclusion".
I hade two projects, where in one it was excluded, and in the other it was not.
Now it works as expected in both. Hopes this helps someone.
I've created a repo where the issue can be reproduced (LuisTovar0/webstorm-issue) and also an issue on YouTrack (https://youtrack.jetbrains.com/issue/WEB-58886/Component-or-directive-matching-X-element-is-out-of-the-current-Angular-modules-scope)