Error: NGCC operation getting failed in Angular Application

Viewed 1282

I am running an Angular Application I am getting these popup in vs code whenever I am opening it. However, the ng serve command is working fine and it's serving(running) the app successfully.

But I am getting this error in console. console error this popup coming in vs code ng serve is serving the app

4 Answers

Angular Language Service Extension has one bug which is reported to their git repository.

My solution will work for Angular Projects which is running < Version 9.0

To resolve this issue you have two ways. Solution 1: Downgrade extension version

  1. Downgrade https://marketplace.visualstudio.com/items?itemName=Angular.ng-template to 11.2.14
  2. Remove Node Module
  3. Run npm install
  4. Run npm start or ng serve

Solution 2: (For Version 12)

  1. Open Vs Code
  2. Go To Files ==> Preference ==> Setting
  3. Under Extension Select Use Legacy View Engine Checkbox.
  4. Run npm start (If you're facing any issue then kindly close VS Code and Remove node_modules folder and Run npm install

enter image description here

it might be some version inconsistency problem. It was in my case.

Had same symptoms: I opened a folder in Visual Studio Code and after few secons I got the same message, but also VSC did not recognize any of angular tags. On the other hand, it did run without problems on my other computer...

I reinstalled VS, angular, nodejs, nothing helped, then the last thing I did is upate all packages in package.json to latest, fixed some code (because of changes in new packages) and now it works!

br, Marjan

reinstall vscode extension Angular Language Service@v11.2.14 resolve my problem.

In my case it is a problem of vs code editor, and the solution is

  1. Go to VS code settings and search for settings.json file.
  2. In settings.json file add this line "extensions.autoUpdate": false, (as in below image)

Settings.json file changes

  1. Now go to angular language service extension settings in market place and install the previous stable version.

This should resolve your error.

Related