Files
pnpm/pkg-manager/plugin-commands-installation/tsconfig.json
Zoltan Kochan 78951f2adb fix: global bin shim invokes pnpm instead of Node when installed via @pnpm/exe (#11335)
* fix(installation): skip pnpm exe when no Node.js is on PATH

When pnpm is installed as @pnpm/exe (a Single Executable Application
that bundles Node.js into the pnpm binary) and the user has no separate
Node.js on PATH, `which('node')` fails and `getNodeExecPath` used to
fall back to `process.execPath` - which in @pnpm/exe is the pnpm binary
itself, not a Node binary. That path got baked into generated global
bin shims via nodeExecPath, so running any globally-installed CLI
invoked pnpm with the target script as its first positional arg,
producing `ERR_PNPM_NO_IMPORTER_MANIFEST_FOUND` from the current
working directory.

Detect the @pnpm/exe case via `detectIfCurrentPkgIsExecutable` and
return undefined from the fallback so the shim emits a plain
`exec node <target>` instead.

Closes #11291
Refs #4645

* Update pkg-manager/plugin-commands-installation/src/nodeExecPath.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-04-22 14:41:12 +02:00

152 lines
2.7 KiB
JSON

{
"extends": "@pnpm/tsconfig",
"compilerOptions": {
"outDir": "lib",
"rootDir": "src"
},
"include": [
"src/**/*.ts",
"../../__typings__/**/*.d.ts"
],
"references": [
{
"path": "../../__utils__/assert-project"
},
{
"path": "../../__utils__/prepare"
},
{
"path": "../../__utils__/test-fixtures"
},
{
"path": "../../__utils__/test-ipc-server"
},
{
"path": "../../catalogs/types"
},
{
"path": "../../cli/cli-meta"
},
{
"path": "../../cli/cli-utils"
},
{
"path": "../../cli/command"
},
{
"path": "../../cli/common-cli-options-help"
},
{
"path": "../../config/config"
},
{
"path": "../../config/config-writer"
},
{
"path": "../../config/deps-installer"
},
{
"path": "../../config/matcher"
},
{
"path": "../../config/pick-registry-for-package"
},
{
"path": "../../dedupe/check"
},
{
"path": "../../deps/status"
},
{
"path": "../../env/plugin-commands-env"
},
{
"path": "../../exec/plugin-commands-rebuild"
},
{
"path": "../../fs/graceful-fs"
},
{
"path": "../../fs/read-modules-dir"
},
{
"path": "../../hooks/pnpmfile"
},
{
"path": "../../lockfile/types"
},
{
"path": "../../packages/constants"
},
{
"path": "../../packages/error"
},
{
"path": "../../packages/logger"
},
{
"path": "../../packages/parse-wanted-dependency"
},
{
"path": "../../packages/types"
},
{
"path": "../../pkg-manifest/manifest-utils"
},
{
"path": "../../pkg-manifest/read-package-json"
},
{
"path": "../../pkg-manifest/read-project-manifest"
},
{
"path": "../../pkg-manifest/write-project-manifest"
},
{
"path": "../../resolving/resolver-base"
},
{
"path": "../../reviewing/outdated"
},
{
"path": "../../store/package-store"
},
{
"path": "../../store/store-connection-manager"
},
{
"path": "../../workspace/filter-packages-from-dir"
},
{
"path": "../../workspace/filter-workspace-packages"
},
{
"path": "../../workspace/find-packages"
},
{
"path": "../../workspace/find-workspace-dir"
},
{
"path": "../../workspace/manifest-writer"
},
{
"path": "../../workspace/pkgs-graph"
},
{
"path": "../../workspace/sort-packages"
},
{
"path": "../../workspace/state"
},
{
"path": "../core"
},
{
"path": "../get-context"
},
{
"path": "../modules-yaml"
}
]
}