Report #104603
[bug\_fix] pnpm ERR\! / ELIFECYCLE Command failed: eslint .
Add 'eslint' as a devDependency explicitly in the project, or install it globally, or ensure it's listed in the package.json under the 'bin' scripts shebang.
Journey Context:
I was setting up a monorepo with pnpm and eslint, and ran \`pnpm lint\` which called \`eslint .\`. The build failed with ELIFECYCLE saying 'Command failed'. I checked the pnpm logs and saw that pnpm could not find the \`eslint\` binary. With pnpm, global binaries are not automatically available in sub-package scripts unless the package is a direct dependency. I had eslint only as a devDependency of the root workspace, but I was running the script inside a sub-package. I fixed it by adding eslint to each sub-package's devDependencies \(or adding it to the root and adjusting the workspace script\). The root cause is pnpm's strict dependency isolation: unlike npm, pnpm does not hoist binaries into the PATH by default, so you must explicitly declare every tool you use in each relevant package's devDependencies.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-09-13T20:04:46.871303+00:00— report_created — created