mattjennings / sveltekit-blog-template

A SvelteKit blog template
https://sveltekit-blog-template.vercel.app
MIT License
233 stars 35 forks source link

Build issue when deplyoing to Cloudflare pages #26

Closed socketopp closed 1 year ago

socketopp commented 1 year ago

Hi, first of all, great blog template. Like it a lot.

What here is dependent on pnpm? Can't find it when I do npm ls pnpm

Tried deploying to Cloudflare pages tonight but got an pnpm error.

I can't figure out how to fix this.

https://bndkt.com/blog/2022/using-pnpm-with-cloudflare-pages https://community.cloudflare.com/t/pnpm-with-cloudlfare-pages/513299

I am currently using version 2 on cloudflare.

Version: 2 (latest)
Date released:
5/17/2023
OS version:

Ubuntu 22.04.2
Default versions:
Go: 1.20.5 | Node.js: 18.16.1 | Python: 3.11.4 | Ruby: 3.2.2
[Show more](https://developers.cloudflare.com/pages/platform/language-support-and-tools/)

Build command:

npm run build

Which then runs vite build.

Here is the error log.

21:53:46.406 | Detected the following tools from environment: npm@9.5.1, pnpm@8.6.6, nodejs@18.16.1 21:53:46.407 | Installing project dependencies: pnpm install 21:53:47.525 | 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 21:53:47.526 |   21:53:47.526 | Try either: 21:53:47.527 | 1. Aligning the version of pnpm that generated the lockfile with the version that installs from it, or 21:53:47.527 | 2. Migrating the lockfile so that it is compatible with the newer version of pnpm, or 21:53:47.527 | 3. Using "pnpm install --no-frozen-lockfile". 21:53:47.527 | Note that in CI environments, this setting is enabled by default. 21:53:47.572 | Error: Exit with error code: 1 21:53:47.572 | at ChildProcess. (/snapshot/dist/run-build.js) 21:53:47.572 | at Object.onceWrapper (node:events:652:26) 21:53:47.573 | at ChildProcess.emit (node:events:537:28) 21:53:47.573 | at ChildProcess._handle.onexit (node:internal/child_process:291:12) 21:53:47.580 | Failed: build command exited with code: 1 21:53:48.527 | Failed: error occurred while running build command

socketopp commented 1 year ago

Sorry for being too hasty. I just needed to go back and change build system version 1. Everything is outlined here https://blog.cloudflare.com/moderizing-cloudflare-pages-builds-toolbox/