Skip to content

fix(repo): patch npm-run-all to detect cjs npm exec paths#2810

Closed
better-salmon wants to merge 1 commit into
solidjs:nextfrom
better-salmon:fix/npm-run-all
Closed

fix(repo): patch npm-run-all to detect cjs npm exec paths#2810
better-salmon wants to merge 1 commit into
solidjs:nextfrom
better-salmon:fix/npm-run-all

Conversation

@better-salmon

@better-salmon better-salmon commented Jul 1, 2026

Copy link
Copy Markdown

Summary

pnpm managed by vite-plus causes this error:

ERROR: spawn /Users/name/.vite-plus/package_manager/pnpm/11.1.1/pnpm/bin/pnpm.cjs EACCES

In this particular setup pnpm 11 exposes npm_execpath as pnpm.cjs. But npm-run-all only treated .js/.mjs paths as Node shims. It tried to execute pnpm.cjs directly and hit EACCES, so the patch treats .cjs as a JS shim and runs it through node.

Updating pnpm to 11.9.0 did not help.

How did you test this change?

pnpm build now works. The patch is minimal and sufficient.

pnpm 11 exposes npm_execpath as pnpm.cjs, but npm-run-all only treated
.js/.mjs paths as Node shims. It tried to execute pnpm.cjs directly and
hit EACCES, so the patch treats .cjs as a JS shim and runs it through
node.
@changeset-bot

changeset-bot Bot commented Jul 1, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 728ff8a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ryansolid

Copy link
Copy Markdown
Member

Thanks for the report and the patch — the diagnosis is right. Rather than carrying a patch for npm-run-all (unmaintained since 2018), we've switched to npm-run-all2 (d6bc696c), the maintained fork, which has the same .cjs handling built in along with other pnpm fixes. Same CLI, no script changes. Your setup should work on next now. Closing in favor of that, but appreciate you tracking it down.

@ryansolid ryansolid closed this Jul 2, 2026
ryansolid added a commit that referenced this pull request Jul 2, 2026
The original is unmaintained and mishandles .cjs npm_execpath values
(pnpm under some setups), causing EACCES. The maintained fork ships the
same CLI bins with the .cjs handling and other pnpm fixes built in.

Co-authored-by: Cursor <cursoragent@cursor.com>
@better-salmon better-salmon deleted the fix/npm-run-all branch July 3, 2026 05:34
@better-salmon

Copy link
Copy Markdown
Author

Yeah, this is better! I was a little afraid to update a dependency as my first contribution, so I tried to keep the patch minimal and easy to reason about.

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.

3 participants