build(deps): declare node-gyp for the embedded MPV native build (#1625)

`apps/electron-backend/build-embedded-mpv.js` resolves the compiler with
`require.resolve('node-gyp/bin/node-gyp.js')` and its comment claimed the
package was "a declared devDependency" — it never was. node-gyp reached the
tree only as a transitive of `@electron/rebuild`, in pnpm's hidden hoist
(`node_modules/.pnpm/node_modules`). pnpm's `.bin` shims export that
directory on NODE_PATH, which is why `pnpm nx …`, `pnpm run build:backend`
and CI kept building the addon, while a plain
`node apps/electron-backend/build-embedded-mpv.js` on a clean install failed
with "Unable to resolve node-gyp".

Declare node-gyp 12.4.0 (the version already in the lockfile store) as a root
devDependency so the resolution no longer depends on a shim implementation
detail, correct the stale comment, and record the contract in the
embedded-MPV architecture doc plus the Agent Bootstrap notes.

No packaged-build change: the no-runtime skip and its
`embedded-mpv-unavailable.txt` marker are untouched.

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Fable 5.1 authored and GitHub committed 2026-09-19 11:30:50 +02:00
1 parent c016c73f86
commit 634a66b1e4
7 files changed
+43 -5

No files matched your search

+9
View File
@@ -0,0 +1,9 @@
---
type: internal
area: deps
---
The Embedded MPV native addon build now declares its `node-gyp` dependency
explicitly, so `node apps/electron-backend/build-embedded-mpv.js` and the
Homebrew development scripts work on a clean checkout instead of failing with
"Unable to resolve node-gyp". Packaged builds are unchanged.