fix: gateway install preserves npm prefix via registry flag #376

Merged
jason.woltje merged 1 commits from fix/gateway-install-prefix-eacces into main 2026-04-04 20:36:15 +00:00
Owner

Summary

  • Replace temp .npmrc + --userconfig approach in installGatewayPackage() with the --@mosaic:registry CLI flag
  • The real ~/.npmrc (including prefix=) is now honoured, eliminating EACCES for non-root installs
  • Bump @mosaic/cli and @mosaic/mosaic to 0.0.15

Root cause

--userconfig replaces the entire user npmrc, discarding prefix=/home/<user>/.npm-global. Without the prefix, npm falls back to /usr/lib/node_modules => EACCES.

Quality gates

  • typecheck: pass
  • lint: pass
  • test: 34 passed
  • prettier: pass

🤖 Generated with Claude Code

## Summary - Replace temp .npmrc + `--userconfig` approach in `installGatewayPackage()` with the `--@mosaic:registry` CLI flag - The real `~/.npmrc` (including `prefix=`) is now honoured, eliminating EACCES for non-root installs - Bump `@mosaic/cli` and `@mosaic/mosaic` to 0.0.15 ## Root cause `--userconfig` replaces the entire user npmrc, discarding `prefix=/home/<user>/.npm-global`. Without the prefix, npm falls back to `/usr/lib/node_modules` => EACCES. ## Quality gates - typecheck: pass - lint: pass - test: 34 passed - prettier: pass 🤖 Generated with Claude Code
jason.woltje added 1 commit 2026-04-04 20:35:55 +00:00
fix: gateway install uses --@mosaic:registry flag to preserve npm prefix
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
3e1f677834
Replace temp .npmrc + --userconfig approach with the --@mosaic:registry CLI
flag so the user's real ~/.npmrc (including prefix=/home/user/.npm-global)
is honoured. This eliminates EACCES errors for non-root installs that
relied on a user-level prefix config.

Bump @mosaic/cli and @mosaic/mosaic to 0.0.15.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jason.woltje merged commit 26fac4722f into main 2026-04-04 20:36:15 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaicstack/stack#376