Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Angular 19: 'imports' is only valid on a component that is standalone

I updated my Angular 18 applications (with standalone components standalone: true) to Angular 19 using ng update:

❯ Updates non-standalone Directives, Component and Pipes to 'standalone:false' 
  and removes 'standalone:true' from those who are standalone.

So far so good, all standalone: true are removed.

However, Visual Studio Code is now issuing following error for imports: [RouterLink, ...]:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

'imports' is only valid on a component that is standalone.

What did I miss?

I followed this guide:

>Solution :

Could you try upgrading the angular language service plugin to the latest version and check if the issue is fixed.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading