Skip to content

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

@danny900714

Description

@danny900714

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.

{
  "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: /<home-directory>/.npm/_logs/2026-06-11T14_13_09_439Z-debug-0.log

Error: Command failed: npm exec tsx "<project-directory>/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://<project-directory>/node_modules/.pnpm/@github+local-action@7.0.1/node_modules/@github/local-action/bin/local-action.js:108:5)
    at file://<project-directory>/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 "<project-directory>/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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions