mirror of
https://github.com/nexu-io/open-design.git
synced 2026-10-27 09:51:12 +01:00
Postinstall assumed `npm_execpath` always points to pnpm's JS entry and invoked it via `node $npm_execpath`. When pnpm is installed as a standalone binary (e.g. `@pnpm/exe` via mise / volta), `npm_execpath` points to an ELF/Mach-O/PE executable and Node fails with "Invalid or unexpected token" parsing the binary as JS. Branch on the executable's extension: keep wrapping `.js`/`.cjs`/`.mjs` entries with `node`, but spawn other paths directly so standalone pnpm binaries work too. Co-authored-by: decker <decker502@qq.com>