I'm trying to build and serve my project. It was working properly, I updated it from git and then suddenly when I serve it, there is an Error saying "Another process, with id 29800, is currently running ngcc." I retried "npm i", also restarted the IDE and even pc, but it still says the same.
11 Answers
This happens when ngcc (Angular compatibility compiler) is not finished doing what it does, you must have enabled ivy
in your Angular project. read here for more info about ivy.
- First try to run
npm install
again, to see if it fixes your problem. - Try to run
ngcc
manually. - remove this file
node_modules/@angular/compiler-cli/ngcc/__ngcc_lock_file__
- If none of the above worked, then remove
node_modules
directory and trynpm i
again.

- 6,334
- 6
- 41
- 78

- 18,215
- 7
- 67
- 72
-
98Deleting the file solved problem. I jumped to step 3 tbh. didn't try other steps. thanks. – hadimbj Apr 09 '20 at 14:09
-
21If you get this error in angular 9 it suggests doing step 3 and that worked for me. delete `__ngcc_lock_file` – Ian Poston Framer May 15 '20 at 04:23
-
1Just another question. Why do we have the __ngcc_lock_file in the first place? – Rambou Jun 05 '20 at 17:16
-
@azerafati how do you run ngcc manually?? I'm trying to run it as in this question: https://stackoverflow.com/questions/69904686/how-to-run-ngcc-with-angular-11-12 – Felipe Centeno Nov 09 '21 at 21:24
-
Unfortunately the link to the `ivy` documentation is not correct. This is the correct url: https://angular.io/guide/ivy – Gerald Spreer Feb 02 '22 at 07:50
-
Only step 4 works too! – Nibia Feb 14 '22 at 17:18
-
related for windows devs deleting `node_modules/`: [What's the fastest way to delete a large folder in Windows?](/q/186737/11107541) – starball May 03 '23 at 02:44
-
for me, `__ngcc_lock_file__` was located directly inside `node_modules/` so check this before deleting whole folder – Nomik May 19 '23 at 11:32
My Laptop Crashed and I got this problem after restart. Removing the below file from ionic project solved the problem:
node_modules/@angular/compiler-cli/ngcc/ngcc_lock_file
The file name may have some leading or trailing underscores in various Angular versions.

- 20,030
- 7
- 43
- 238

- 850
- 10
- 16
-
10It was `node_modules/@angular/compiler-cli/ngcc/__ngcc_lock_file__` on Angular 9.1 – alexandre-rousseau Jun 26 '20 at 13:46
Fix this all in one easy command:
run npm ci
this will delete node_modules
and npm install

- 1,547
- 13
- 19
This happens when ngcc (Angular compatibility compiler) is not finished doing what it does
In Angular 15 of lock file is changed. To release the lock, execute in project folder
rm node_modules/.ngcc_lock_file

- 141
- 8
-
1I think you could convince more users of the helpfulness of your contribution if you would spend some words on explanation. Try for [answer]. – Yunnosch Mar 06 '23 at 14:10
I deleted the file node_modules/@angular/compiler-cli/ngcc/ngcc_lock_file_
from the node_modules
folder and its working fine.

- 1,019
- 7
- 20

- 169
- 2
- 3
deleting lock file in nodes module at the following location will fix this errors
*C:\Users\OneDrive\Desktop\app\node_modules\@angular\compiler-cli\ngcc\src\locking*
delete the lock-file javascript file over there.
if it still shows the same error then delete the entire lock-files folder ,restart command prompt and then it will run

- 37
- 3
Also if above solutions, dosen´t work it could be that the pipeline has too little space to work with side processes. What you could do is go to angular.json and search for this object:
"budgets": [{"type": "initial","maximumWarning": "4mb","maximumError": "5mb"}]
and raise the limits on maximumError for example.
More about budgets here: angular.io/guide

- 75
- 12
Had the same issue running angular with a docker file, and like suggested here I deleted ngcc_lock_file BEFORE running npm install

- 44
- 3
Just run
ionic repair
And select Yes

- 13
- 1
-
1To get a better rating, it is advisable to include examples and a bit more details. That way, it is useful for others over than just the OP – mw509 Jul 22 '20 at 14:03
-
1