[pnpm] Build Error on Pages with sveltekit

pnpm recently updated to 8.6 and now their lockfile is version 6.1, having build failures due to an older lock version (6.0) with "@sveltejs/adapter-cloudflare": "^2.3.0"

Downgrading to [email protected] has solved the issue for now

I imagine sveltekit pages will not build properly unitl pnpm upgraded to 8.6 on cloudflare

14:11:38.889	Success: Finished cloning repository files
14:11:40.311	Detected the following tools from environment: [email protected], [email protected]
14:11:40.312	Installing project dependencies: pnpm install
14:11:41.413	 WARN  Your pnpm-lock.yaml was generated by a newer version of pnpm. It is a compatible version but it might get downgraded to version 6.0
14:11:41.416	Lockfile is up to date, resolution step is skipped
14:11:41.428	 ERR_PNPM_LOCKFILE_MISSING_DEPENDENCY  Broken lockfile: no entry for '/@sveltejs/adapter-auto/2.1.0(@sveltejs/[email protected])' in pnpm-lock.yaml
14:11:41.428	
14:11:41.429	This issue is probably caused by a badly resolved merge conflict.
14:11:41.429	To fix the lockfile, run 'pnpm install --no-frozen-lockfile'.
14:11:41.477	Error: Exit with error code: 1
14:11:41.477	    at ChildProcess.<anonymous> (/snapshot/dist/run-build.js)
14:11:41.478	    at Object.onceWrapper (node:events:652:26)
14:11:41.478	    at ChildProcess.emit (node:events:537:28)
14:11:41.478	    at ChildProcess._handle.onexit (node:internal/child_process:291:12)
14:11:41.485	Failed: build command exited with code: 1
14:11:42.422	Failed: error occurred while running build command
2 Likes

ERR_PNPM_FROZEN_LOCKFILE_WITH_OUTDATED_LOCKFILE Cannot perform a frozen installation because the version of the lockfile is incompatible with this version of pnpm

We can set PNPM_VERSION = 7.30.5 as environmental variables to avoid those error