Fix npm run build Failed on Windows: Common Causes and Solutions - Creating a Branch from Detached HEAD in Git-How to Remove Stuck Git Lock Files After Crash

Result check
- Keep one change per test run so you know which step helped.
- Undo temporary changes after the issue is confirmed.