Build Node/PNPM version errors
Trying to deploy a new SvelteKit project created with
Build log:
I tried redeploying with specific versions for node and pnpm, but this didn't seem to work?
pnpm create cloudflare@latestpnpm create cloudflare@latestBuild log:
16:21:59.225 Found wrangler.toml file. Reading build configuration...
16:21:59.231 pages_build_output_dir: .svelte-kit/cloudflare
16:21:59.231 Build environment variables: (none found)
16:21:59.338 Successfully read wrangler.toml file.
16:21:59.481 Detected the following tools from environment: pnpm@8.7.1, nodejs@18.17.1
16:22:00.253 Installing project dependencies: pnpm install
16:22:00.874 ERR_PNPM_UNSUPPORTED_ENGINE Unsupported environment (bad pnpm and/or Node.js version)
16:22:00.874
16:22:00.874 Your Node version is incompatible with "/opt/buildhome/repo".
16:22:00.874
16:22:00.874 Expected version: >=18.18.0
16:22:00.874 Got: v18.17.1
16:22:00.875
16:22:00.875 This is happening because the package's manifest has an engines.node field specified.
16:22:00.875 To fix this issue, install the required Node version.
16:22:00.907 Error: Exit with error code: 1
16:22:00.907 at ChildProcess.<anonymous> (/snapshot/dist/run-build.js)
16:22:00.907 at Object.onceWrapper (node:events:652:26)
16:22:00.907 at ChildProcess.emit (node:events:537:28)
16:22:00.907 at ChildProcess._handle.onexit (node:internal/child_process:291:12)
16:22:00.917 Failed: build command exited with code: 1
16:22:03.020 Failed: error occurred while running build command16:21:59.225 Found wrangler.toml file. Reading build configuration...
16:21:59.231 pages_build_output_dir: .svelte-kit/cloudflare
16:21:59.231 Build environment variables: (none found)
16:21:59.338 Successfully read wrangler.toml file.
16:21:59.481 Detected the following tools from environment: pnpm@8.7.1, nodejs@18.17.1
16:22:00.253 Installing project dependencies: pnpm install
16:22:00.874 ERR_PNPM_UNSUPPORTED_ENGINE Unsupported environment (bad pnpm and/or Node.js version)
16:22:00.874
16:22:00.874 Your Node version is incompatible with "/opt/buildhome/repo".
16:22:00.874
16:22:00.874 Expected version: >=18.18.0
16:22:00.874 Got: v18.17.1
16:22:00.875
16:22:00.875 This is happening because the package's manifest has an engines.node field specified.
16:22:00.875 To fix this issue, install the required Node version.
16:22:00.907 Error: Exit with error code: 1
16:22:00.907 at ChildProcess.<anonymous> (/snapshot/dist/run-build.js)
16:22:00.907 at Object.onceWrapper (node:events:652:26)
16:22:00.907 at ChildProcess.emit (node:events:537:28)
16:22:00.907 at ChildProcess._handle.onexit (node:internal/child_process:291:12)
16:22:00.917 Failed: build command exited with code: 1
16:22:03.020 Failed: error occurred while running build commandI tried redeploying with specific versions for node and pnpm, but this didn't seem to work?
NODE_VERSION=20.12.2
PNPM_VERSION=9.0.6NODE_VERSION=20.12.2
PNPM_VERSION=9.0.6