Fix npm run build Permission Denied on Linux - Fix 'fatal: refusing to merge unrelated histories' in Git-Resolve npm Global Permission Denied on macOS/Linux

Final checklist
- Confirm that the same symptom is gone after a restart or refresh.
- Keep the smallest working change and undo temporary diagnostic settings.