执行ng serve -o命令时出现ngcc进程已运行错误(ID:14828)
Fixing "Error: ngcc is already running at process with id 14828" in Angular
Hey there, I’ve run into this exact ngcc conflict before—super frustrating when you’re trying to fire up your Angular app! Let’s fix this step by step:
Terminate the conflicting ngcc process
- On Windows: Open Task Manager, locate the process with PID
14828, right-click it and select "End Task". Alternatively, run this command in Command Prompt/PowerShell:taskkill /F /PID 14828 - On Mac/Linux: Open your terminal and run this command to force-kill the process:
kill -9 14828
- On Windows: Open Task Manager, locate the process with PID
Clear Angular and package manager caches
- First, clean your npm/yarn cache to remove any stale lock files:
npm cache clean --force # Or if you use yarn: yarn cache clean - Then clear Angular's local cache (works for Angular CLI 12+):
ng cache clean - If the above doesn't work, you can manually delete the
.angular/cachefolder inside your project'snode_modulesdirectory.
- First, clean your npm/yarn cache to remove any stale lock files:
Restart your Angular app
- Now run your start command again:
ng serve -o
- Now run your start command again:
A quick tip to prevent this in the future: Always use Ctrl+C to properly terminate your ng serve process before closing the terminal window—this ensures ngcc exits cleanly instead of leaving orphaned processes behind.
内容的提问来源于stack exchange,提问作者Pasan Mahesha
相关产品推荐
相关产品推荐

