Skip to content

Fix npm packaging on Windows by resolving npm.cmd - #19

Open
4sapp wants to merge 1 commit into
CognitionAI:mainfrom
4sapp:codex/fix-windows-npm-pack
Open

4sapp wants to merge 1 commit into
CognitionAI:mainfrom
4sapp:codex/fix-windows-npm-pack

Conversation

@4sapp

@4sapp 4sapp commented Oct 8, 2026 •

Copy link
Copy Markdown

On Windows, release(..., publish=False) fails with FileNotFoundError: [WinError 2] even when npm is installed: subprocess.run(["npm", ...]) does not resolve the npm.cmd shim.

Resolve npm with shutil.which() before invoking it. Add an integration test that runs a real npm pack from a directory containing spaces and verifies the generated package metadata, plus a Windows/Linux/macOS test workflow.

Validation: python -m unittest discover -s tests -v fails on the original code and passes with this change on Windows (Python 3.14, npm 11.17.0). The test only packs a local fixture; it does not publish or download release binaries.

CI passed on Windows, Linux, and macOS with Python 3.12 and Node.js 22.

@staging-devin-ai-integration staging-devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review (Staging)

Debug

Playground

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