pnpm version in build and .tool-versions

I am using asdf to manage my local development toolchain and I have these 2 lines in the file
nodejs 22.2.0
pnpm 9.1.1
nodejs 22.2.0
pnpm 9.1.1
In my Cloudflare Pages env variable, I also set these 2
NODE_VERSION 22.2.0
PNPM_VERSION 9.1.1
NODE_VERSION 22.2.0
PNPM_VERSION 9.1.1
the pages build failed with this error
15:52:26.052 Found a .tool-versions file in user-specified root directory. Installing dependencies.
15:52:26.449 pnpm plugin is not installed
15:52:26.453 Error: Exit with error code: 1
15:52:26.052 Found a .tool-versions file in user-specified root directory. Installing dependencies.
15:52:26.449 pnpm plugin is not installed
15:52:26.453 Error: Exit with error code: 1
but if I remove the pnpm version from .tool-verions file, build will be ok. any suggestions here? I want to keep the version in .tool-version as we have tools version mismatch in the team before and it make diff quite messy. for my preference, if I can just keep versioning in .tool-versions and not env, it would be the best
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?