Component or directive matching router-outlet element is out of the current Angular module's scope

I've build a monorepo using Nx, my workspace structure is the current:

inside shop/src/app/app.component.html I've inserted a router-outlet. Inside app.module.ts I've imported AppRoutingModule where I've imported the RouterModule as showed inside the following images.


I can't understand why Webstorm is warning.

0
7 comments

Can't reproduce with similar code

Please could you share a sample app the issue can be repeated with? What IDE version do you use?

0

Same exact Problem in Rider.

0

Elena, don't understand your comment: you're linking to the same page you are writing on ?

0

@Ricardo

Elena, don't understand your comment: you're linking to the same page you are writing on ?

Yes -- to a specific comment:

Can't reproduce with similar code

Please could you share a sample app the issue can be repeated with? What IDE version do you use?

Sadly it's a common thing on forums: it's easy to come and say "me too" but somehow not many can be bothered with providing a sample code or requested details. If something works for one person but does not for another one then there is some difference somewhere and a test project/setup is needed to try and find out why it happens.

1

Incorrect warning. In this case, the application works! Created an application according to the official documentation.

0

Andruxakonst are you using Angular 13? If yes, you need upgrading to 2021.3 when it's released

See https://youtrack.jetbrains.com/issue/WEB-53312#focus=Comments-27-5485654.0-0

1

Please sign in to leave a comment.