You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "Astro-Han (via GitHub)" <gi...@apache.org> on 2026/08/31 14:28:50 UTC

[I] Packaging and install scripts assume a flat, hoisted node_modules [maka]

Astro-Han opened a new issue, #4367:
URL: https://github.com/apache/maka/issues/4367

   ## What happened
   
   Two places locate packages by walking to the workspace root:
   
   - `apps/desktop/electron-builder.config.mjs` — `extraResources` reads `../../node_modules/electron/dist/LICENSE`, `.../LICENSES.chromium.html`, and the two `@fontsource-variable/geist*/LICENSE` files.
   - `scripts/install-electron-with-retry.mjs` — resolves `electron/install.js` from the repo root.
   
   All four packages are declared in `apps/desktop`, not at the root. Those paths only resolve because npm hoists everything up. Under any layout that does not hoist, the four `extraResources` entries silently miss — electron-builder logs `file source doesn't exist` and still exits 0 — and the electron installer throws `Cannot find module 'electron/install.js'`.
   
   I care about the first one most: a packaged app without Electron's `LICENSE` and `LICENSES.chromium.html` breaks the notice requirement. `scripts/verify-packaged-app.mjs` already asserts both, so the failure surfaces at verification rather than where it originates.
   
   ## How to reproduce
   
   Install with a package manager that does not hoist (I used pnpm with `nodeLinker: isolated`), then run `electron-builder --mac --arm64 --dir`. The four warnings appear and the build still reports success.
   
   ## Environment
   
   macOS arm64, Node 24, electron-builder 26.15.3.
   
   ## Additional context
   
   I hit this while evaluating pnpm, but the defect is independent of that decision — it is a latent assumption in our own config. The fix I verified is to resolve the package directory instead of assuming its location, using `createRequire(import.meta.url).resolve('<pkg>/package.json')`. About 25 lines across the two files, correct under npm today.
   
   _Analysis produced with Claude Code and verified against a packaged build._
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [I] Packaging and install scripts assume a flat, hoisted node_modules [maka]

Posted by "Astro-Han (via GitHub)" <gi...@apache.org>.
Astro-Han closed issue #4367: Packaging and install scripts assume a flat, hoisted node_modules
URL: https://github.com/apache/maka/issues/4367


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [I] Packaging and install scripts assume a flat, hoisted node_modules [maka]

Posted by "liuxiaocs7 (via GitHub)" <gi...@apache.org>.
liuxiaocs7 commented on issue #4367:
URL: https://github.com/apache/maka/issues/4367#issuecomment-5479860314

   take
   
   I'll take a look.
   Thanks.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org


Re: [I] Packaging and install scripts assume a flat, hoisted node_modules [maka]

Posted by "liuxiaocs7 (via GitHub)" <gi...@apache.org>.
liuxiaocs7 commented on issue #4367:
URL: https://github.com/apache/maka/issues/4367#issuecomment-5479905854

   take


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org