New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Language Service. Component '...' is not included in a module and will not be available inside a template #19405
Comments
I ran into the same issue using WebStorm EAP. Every Updating to the latest version of the EAP (WebStorm 2017.3 EAP, Build #WS-173.3188.31, built on October 12, 2017) solved it though. |
@nadav1991 Did you checked it with my reproduction? I just checked with angular 4.4.6 and WS-173.3302.13 and it's still there. Also I personally don't think it has anything to do with WS, instead language service should be blamed. What do you mean |
For me this problem was resolved when I moved the component directory to the same level as the module. To illustrate, I went from:
to this
I'm not sure why it didn't work the previous way. All the imports and paths were correct. Since it worked after de-nesting the components I'm just keeping it this way |
@RaphiStein thank you, that did work. Anyways, I would be glad if this bug was fixed, because only small modules could bear keeping its components on the same folder. |
Actually, in my case, it still shows the error, even when I have the following folder structure and the release version of WebStorm 2017.3:
|
i am having the same errors. however, if i quit and re-open webstorm, the error goes away. i've also noticed this with random "unknown element" errors when i have installed such things as angular material. i wonder if it's a cache issue. next time i'll get it (likely later today), maybe using "invalidate caches" in the menu would do the trick... Env details: |
I think this is related to #16382 |
I just ran into that as well. Like for chiefbrwnmeanie quitting and re-opening did the job. |
same here
|
Any updates? I have the same problem with Angular 5.1.2, Webstorm 2017.3.1, Mac or Linux x64. |
This commit fixes a bug whereby the empty set of analyzed modules is cached and subsequently produces the incorrect error 'Component ... is not included in a module...' PR Close angular#19405
This commit fixes a bug whereby the empty set of analyzed modules is cached and subsequently produces the incorrect error 'Component ... is not included in a module...' PR Close angular#19405
This commit fixes a bug whereby the caches are not cleared when the program changes. This subsequently produces the incorrect error of 'Component ... is not included in a module ...'. PR Close angular#19405
Maybe unrelated, but just in case:
(I don't know what I'm missing when not having that line in WebStorm 2017.3.2 (latest version), Angular 5.1.3 (latest version). |
avbentem solved my problem by checking the 'recompile on changes' box in the options for Webstorm. The next time I changed a character it was recompiled and the errors went away. Thanks! |
This commit fixes a bug whereby the caches are not cleared when the program changes. This subsequently produces the incorrect error of 'Component ... is not included in a module ...'. PR Close angular#19405
@Rawr421 thank you, changing a character and recompiling did the trick |
Using Node in VS Code, changing |
This commit fixes a bug whereby the caches are not cleared when the program changes. This subsequently produces the incorrect error of 'Component ... is not included in a module ...'. PR Close angular#19405 PR Close angular#21337
Using that same menu @avbentem shows and toggling the Angular Language Service (applying changes in between) resolves the issue for the editor. |
Try to close - open IDEA |
I get the same error as already mentioned. I tried several solutions. close IDEA, enable the 'Recompile on change' option, tsconfig.json compileOnSave: true, invalidate the cache, ... but nothing helped. |
Just reload your IDE.
пн, 14 янв. 2019 г., 10:52 Alexander Buss <notifications@github.com>:
… I get the same error as already mentioned.
Angular 7.2
IntelliJ IDEA 2018.3.3 (Ultimate Edition) Build #IU-183.5153.38, built on
January 9, 2019
macOS 10.14.2.
I tried several solutions. close IDEA, enable the 'Recompile on change'
option, tsconfig.json compileOnSave: true, invalidate the cache, ... but
nothing helped.
Is there a fix for this error?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#19405 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJ9ZuZ2RRmcbEXQkHynyXEIdt-0sEOKZks5vDEVOgaJpZM4PkNbX>
.
|
uncheck angular language service |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
I'm submitting a...
I have a simple component:
in
tsconfig
there is a mapping that points to component's folder:and finally, component is imported using this mapping and is added to the main module alongside with root component:
Current behavior
Language service shows error for
HomeComponent
:Error:(3, 2) Angular: Component 'HomeComponent' is not included in a module and will not be available inside a template. Consider adding it to a NgModule declaration
Expected behavior
No error, component is actually imported.
Minimal reproduction of the problem with instructions
Check the repo.
Environment
The text was updated successfully, but these errors were encountered: