Closed ghost closed 3 months ago
For now I workaround using pnpm dlx @11ty/eleventy
.
I think this really just boils down to how the current documentation suggests running Eleventy with npx @11ty/eleventy
, which is actually quite confusing. npx
for the most part is used to pull down and execute packages from the registry as a one time deal (not installed in a directory or anything). npx
does work however to use local binaries when possible, which is why this method works to run the locally installed version of Eleventy. However, pnpm
/pnpm exec
are for executing "a shell command in scope of a project", and there actually isn't a binary called @11ty/eleventy
- the actual name is just eleventy
, and pnpm tells you this in the same error as originally reported (see the last line of below):
ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL Command "@11ty/eleventy" not found
Did you mean "pnpm exec eleventy"?
The documentation should probably be updated to recommend eleventy
over npx @11ty/eleventy
.
As part of #2876 I did verify the relevant commands here and confirmed they are working. The docs have been updated too as noted here https://github.com/11ty/eleventy/issues/2876#issuecomment-2207189707
Thank you (and appreciate your help here @uncenter!)
Description of the Bug
I'm following the Getting Started guide. After installation of Eleventy and creation of some basic files (
index.html
andREADME.md
) I tried to execute Eleventy, but got the following error message:This happens only when using
pnpm
and doesn't happen when usingnpx
.To Reproduce
Steps to reproduce the behaviour:
pnpm add -D @11ty/eleventy
,index.html
andREADME.md
files with basic contents,pnpm @11ty/eleventy
orpnpm exec @11ty/eleventy
and get the error message mentioned above,npx @11ty/eleventy
to ensure that it doesn't happen withnpx
.Expected Behavior
Environment