Skip to content

fix: resolve Windows build/check crash and npm shrinkwrap registry 404#29

Open
SHJordan wants to merge 1 commit into
code-yeongyu:mainfrom
SHJordan:fix/windows-build-and-shrinkwrap
Open

fix: resolve Windows build/check crash and npm shrinkwrap registry 404#29
SHJordan wants to merge 1 commit into
code-yeongyu:mainfrom
SHJordan:fix/windows-build-and-shrinkwrap

Conversation

@SHJordan
Copy link
Copy Markdown

@SHJordan SHJordan commented Jun 1, 2026

This PR fixes two issues:

  1. Windows build/check crash:

    • In scripts/build-all.mjs and scripts/run-web-ui-check.mjs, the script was trying to evaluate native binaries (such as pnpm.exe on Windows, which is set in npm_execpath by newer pnpm installations) using Node.js, causing a SyntaxError. We fixed this by detecting if the execpath does not end in .js/.cjs (which indicates a native binary) and running it directly instead of wrapping it via Node.
  2. Package shrinkwrap dependency registry 404 error:

    • The generated npm-shrinkwrap.json for @code-yeongyu/senpi contained registry references to internal, private workspace packages (like @earendil-works/pi-tui) which are bundled but not actually published to the public registry. This resulted in 404 Not Found errors when users tried to install @code-yeongyu/senpi.
    • We updated scripts/generate-coding-agent-shrinkwrap.mjs to mark internal dependencies as "inBundle": true and omit resolved URL registry references, forcing npm to resolve them from the bundled contents.

Summary by cubic

Fixes Windows build/check crashes by executing native package manager binaries directly. Also updates shrinkwrap generation to bundle internal packages, avoiding registry 404s when installing @code-yeongyu/senpi.

  • Bug Fixes
    • Detect native package manager execpath (e.g., pnpm.exe) and run it directly in build/check scripts; otherwise load .js/.cjs via Node.
    • Mark internal workspace deps (@earendil-works/pi-agent-core, @earendil-works/pi-ai, @earendil-works/pi-tui) as "inBundle": true and omit resolved URLs in the generated npm-shrinkwrap.json.

Written for commit 5e3d7d1. Summary will update on new commits.

Review in cubic

- Fix scripts/build-all.mjs and scripts/run-web-ui-check.mjs to execute native package manager binaries directly instead of passing them to node on Windows.

- Fix generate-coding-agent-shrinkwrap.mjs to mark internal workspace dependencies with inBundle: true and avoid registry resolution paths.
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant