github / github/local-action

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

Offen
#293 0 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
451
Forks
28
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
node.js, typescript
Bereich
developer-experience, tooling
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
52/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.