1

When I run ng serve -o command in the terminal produced the below command

Error: ngcc is already running at process with id 14828.

enter image description here

Pasan Mahesha
  • 21
  • 1
  • 5
  • This actually happens when @angular/compiler-cli does not finish a task. This issue is solved [here](https://stackoverflow.com/a/61122898/13287425) please take a look – Raph Jacksun Aug 14 '20 at 01:21

5 Answers5

4

Stop the server and run rm node_modules/@angular/compiler-cli/ngcc/ngcc_lock_file.

Reynier Rivero
  • 2,042
  • 2
  • 8
  • 12
2

I have encountered this error message several times. Just follow these steps and I am sure, you will be able to do ng serve without any issues.

  1. Go to node_modules
  2. Go to @angular
  3. Go to compiler-cli
  4. Now to ngcc
  5. Now, you would see ngcc_lock_file. Just delete it and restart your IDE. Now do ng serve and it will work.
Aman
  • 33
  • 7
1

Stop the server

Delete the lockfile at project directory path/node_modules/@angular/compiler-cli/ngcc/ngcc_lock_file.)

Then run ng serve -o

Pasan Mahesha
  • 21
  • 1
  • 5
0

Just delete node_modules and reinstall node modules or you can remove this file node_modules/@angular/compiler-cli/ngcc/ngcc_lock_file

Indrakumara
  • 1,595
  • 17
  • 22
0

This can be caused by Angular Language Service (ALS) in VSCode. Try disabling ALS for a bit or kill VSCode completely and then try to rebuild your project.

Mathias W
  • 1,433
  • 12
  • 16