"pnpm" issues (git pull)

I tried to clone bolt.diy from git and also pnpm from Installation | pnpm, but it’s constantly failing with ‘esbuild’: Error: Expected “0.24.2” but got “”
How can i solve this?

C:\Users\LLM\bolt.diy>pnpm install
Lockfile is up to date, resolution step is skipped
Packages: +1582
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 1582, reused 1581, downloaded 0, added 1, done
node_modules/.pnpm/esbuild@0.21.5/node_modules/esbuild: Running postinstall script…
node_modules/.pnpm/esbuild@0.24.2/node_modules/esbuild: Running postinstall script, failed in 1.1s
…/esbuild@0.24.2/node_modules/esbuild postinstall$ node install.js
│ C:\Users\LLM\bolt.diy\node_modules.pnpm\esbuild@0.24.2\node_modules\esbuild\install.js:135
│ throw new Error(Expected ${JSON.stringify(versionFromPackageJSON)} but got ${JSON.stringify(stdout)});
│ ^
│ Error: Expected “0.24.2” but got “”
│ at validateBinaryVersion (C:\Users\LLM\bolt.diy\node_modules.pnpm\esbuild@0.24.2\node_modules\esbuild\install.js:135:11)
│ at C:\Users\LLM\bolt.diy\node_modules.pnpm\esbuild@0.24.2\node_modules\esbuild\install.js:283:5
│ Node.js v20.17.0
└─ Failed in 1.1s at C:\Users\LLM\bolt.diy\node_modules.pnpm\esbuild@0.24.2\node_modules\esbuild
node_modules/.pnpm/esbuild@0.17.6/node_modules/esbuild: Running postinstall script…
node_modules/.pnpm/esbuild@0.23.1/node_modules/esbuild: Running postinstall script…
node_modules/.pnpm/electron@33.4.8/node_modules/electron: Running postinstall script…
ELIFECYCLE Command failed with exit code 1.
node_modules/.pnpm/esbuild@0.25.1/node_modules/esbuild: Running postinstall script…

I fixed it myself - had a standalone NVM that i had downloaded and was causing conflict issues with node js versions and pnpm not running.

I suggest to always take the nvm-setup.exe latest version to avoid PATH errors and troubleshooting later on.

IMPORTANT: “esbuild” must be ver 0.25.9 in current git pull.
Anything else messes up the initialization.

PS C:\Users\LLM\bolt.diy> $env:ESBUILD_PLATFORM = “win32”
PS C:\Users\LLM\bolt.diy> $env:ESBUILD_CPU = “x64”
PS C:\Users\LLM\bolt.diy> Get-Content package.json | Select-String “esbuild”

  "esbuild": "0.25.9",
  "esbuild-windows-64": "0.25.9",
  "@esbuild/win32-x64": "0.25.9",

If you encounter this error, do the following:

Install the specific versions

pnpm add -D @esbuild/win32-x64@0.25.9
pnpm add -D esbuild@0.25.9

Then do the full install

pnpm install --force --no-verify-store-integrity --unsafe-perm

Note: We don’t need esbuild-windows-64 as it’s an older package format - @esbuild/win32-x64 is its modern replacement.