0

We have a production Angular app that we're in the process of moving to a Monorepo with NX. So far we have everything working properly from dev to production with no issues.

However, in VSCode, basically every Angular directive (*ngFor, *ngIf, [routerLink], everything...) is erroring out and is not recognized.

(Before you ask, yes: all modules (i.e.CommonModule, BrowserModule are properly imported in the .module.ts file)

Like I said: Everything works fine when served locally and in production, including in our CI/CD pipeline: no errors. Lint, Test, and build also all work without issue... I suspect this is a VS Code, TSConfig, or Angular.json issue but I've been spinning my wheels for 2 days.

enter image description here

Possibly related is that all of the libraries are also not being picked up by VS Code:

enter image description here

Any advice?

Jesse Williams
  • 436
  • 4
  • 17
  • Open the extension output window in VS Code and see if angular language service has thrown errors – Aluan Haddad Dec 18 '21 at 07:28
  • 1
    @AluanHaddad No noticeable errors with Angular Language Service but I could see "Enabling View Engine language service for..." This lead me into looking at the settings for the extension and found the answer... I'll post it now. Thank you so much for leading me down the path, I'm the Manager for the team and don't get into VS Code very often :-) – Jesse Williams Dec 18 '21 at 18:56
  • Glad I could be of service – Aluan Haddad Dec 18 '21 at 19:08

1 Answers1

4

The issue turned out to be with our settings for the Angular Language Service extension

The "Angular: View-engine" setting was set as Use legacy View Engine language service : true" which needs to be false for Apps using Ivy.

enter image description here

Jesse Williams
  • 436
  • 4
  • 17