Fix pnpm Permission Denied Errors on macOS - Node Version Mismatch with Global Tools: Diagnosis and Fix-Resolve 'fatal: refusing to merge unrelated histories'

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