github / github/local-action

[Bug] `devEngines.packageManager` set to pnpm in `package.json` prevents local-action from running `npm exec tsx`

Open
#293 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
451
Forks
28
PR merge metrics
No merged PRs in 30d

Description

I'm using `pnpm` as the package manager. However, with the following `package.json` settings, local-action failed to start when running `pnpm run local-action`.

```json
{
"name": "github-action",
"version": "1.0.0",
"description": "",
"keywords": [],
"license": "MIT",
"author": "",
"type": "module",
"scripts": {
"local-action": "local-action . src/main.ts .env",
},
"devDependencies": {
"@github/local-action": "^7.0.1"
},
"devEngines": {
"packageManager": {
"name": "pnpm",
"version": "^11.5.2",
"onFail": "download"
}
}
}
```

Below is the error log:

```
npm error code EBADDEVENGINES
npm error EBADDEVENGINES The developer of this package has specified the following through devEngines
npm error EBADDEVENGINES Invalid devEngines.packageManager
npm error EBADDEVENGINES Invalid name "pnpm" does not match "npm" for "packageManager"
npm error EBADDEVENGINES {
npm error EBADDEVENGINES current: { name: 'npm', version: '11.13.0' },
npm error EBADDEVENGINES required: { name: 'pnpm', version: '^11.5.2', onFail: 'download' }
npm error EBADDEVENGINES }
npm error A complete log of this run can be found in: //.npm/_logs/2026-06-11T14_13_09_439Z-debug-0.log

Error: Command failed: npm exec tsx "/node_modules/.pnpm/@github+local-action@7.0.1/node_modules/@github/local-action/src/index.ts" -- . src/main.ts .env
at genericNodeError (node:internal/errors:985:15)
at wrappedFn (node:internal/errors:539:14)
at checkExecSyncError (node:child_process:925:11)
at execSync (node:child_process:997:15)
at entrypoint (file:///node_modules/.pnpm/@github+local-action@7.0.1/node_modules/@github/local-action/bin/local-action.js:108:5)
at file:///node_modules/.pnpm/@github+local-action@7.0.1/node_modules/@github/local-action/bin/local-action.js:121:1
at ModuleJob.run (node:internal/modules/esm/module_job:439:25)
at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:633:26)
at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 70918,
stdout: null,
stderr: null
}
[ELIFECYCLE] Command failed with exit code 1.
```

It seems that setting `devEngines.packageManager` set to pnpm in `package.json` prevents local-action from running `npm exec tsx "/node_modules/.pnpm/@github+local-action@7.0.1/node_modules/@github/local-action/src/index.ts" -- . src/main.ts .env`.

Consider running `tsx` without relying on package manager by adding `tsx` as dependency. This makes local-action independent from package managers.

Contributor guide

Open the contributing guide

Research direction

Start with the package.json reproduction and the local-action command, then inspect the local-action.js entry point shown in the stack trace around the npm exec invocation. Reproduce the failure with pnpm and devEngines.packageManager set to pnpm; done means pnpm run local-action starts successfully without the EBADDEVENGINES error.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js, typescript
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.