SvelteKit minimal template doesn't build at Cloudflare but works fine on my machine

Hello! I'm getting the following error when building a SvelteKit minimal app without any changes:
00:02:14.492 Installing project dependencies: npm clean-install --progress=false
00:02:15.393 npm error code EUSAGE
00:02:15.393 npm error
00:02:15.394 npm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
00:02:15.394 npm error
00:02:15.394 npm error Invalid: lock file's [email protected] does not satisfy [email protected]
00:02:15.394 npm error Missing: [email protected] from lock file
00:02:15.394 npm error Missing: [email protected] from lock file
00:02:15.394 npm error Missing: [email protected] from lock file
00:02:15.395 npm error
00:02:15.395 npm error Clean install a project
00:02:15.395 npm error
00:02:14.492 Installing project dependencies: npm clean-install --progress=false
00:02:15.393 npm error code EUSAGE
00:02:15.393 npm error
00:02:15.394 npm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync. Please update your lock file with `npm install` before continuing.
00:02:15.394 npm error
00:02:15.394 npm error Invalid: lock file's [email protected] does not satisfy [email protected]
00:02:15.394 npm error Missing: [email protected] from lock file
00:02:15.394 npm error Missing: [email protected] from lock file
00:02:15.394 npm error Missing: [email protected] from lock file
00:02:15.395 npm error
00:02:15.395 npm error Clean install a project
00:02:15.395 npm error
To reproduce this issue, you just need to create a SvelteKit minimal project with npx sv create my-app and select Typescript with Prettier, Eslint and TailwindCSS. I believe this is an issue with Cloudflare since I'm able to do npm ci in my machine without any issues. I also tried using the specific Node version I'm using in my machine, v22.12.0, on Cloudflare, but that didn't solve the issue. I first noticed this issue on my project when I update Svelte to v5. However, I noticed that the minimal app also has this issue. The deployment ID of the testing app is: c134ef57-9575-4f6a-b29c-a0fab939b511 Does anyone has any idea why this might be happening? Thanks.
1 Reply
itaquito
itaquitoOP7d ago
This is the output of npm ci on my machine
PS > npm ci

added 268 packages, and audited 269 packages in 7s

77 packages are looking for funding
run `npm fund` for details

2 low severity vulnerabilities

To address all issues (including breaking changes), run:
npm audit fix --force

Run `npm audit` for details.
PS > npm ci

added 268 packages, and audited 269 packages in 7s

77 packages are looking for funding
run `npm fund` for details

2 low severity vulnerabilities

To address all issues (including breaking changes), run:
npm audit fix --force

Run `npm audit` for details.
Aparently, manually installing picomatch as a dev dependency solves the issue: npm i --save-dev picomatch

Did you find this page helpful?