Skip to content

fix: lockfile that Cloudflare's npm 10 accepts, so the CDN deploys again - #229

Merged
TobiasDuelli merged 1 commit into
masterfrom
fix-lockfile-npm10
Nov 23, 2026
Merged

TobiasDuelli merged 1 commit into
masterfrom
fix-lockfile-npm10

Conversation

@TobiasDuelli

Copy link
Copy Markdown
Collaborator

The CDN deploy (Cloudflare Workers Builds, jssdk) has failed on every push to master since #223. It installs with npm 10.9.2 (npm clean-install), and npm 10 rejects the lockfile that npm 11 wrote:

npm error `npm ci` can only install packages when your package.json and package-lock.json or npm-shrinkwrap.json are in sync.
npm error Missing: esbuild@0.28.2 from lock file
npm error Missing: @esbuild/aix-ppc64@0.28.2 from lock file
…
Failed: error occurred while installing tools or dependencies

vitest's nested vite declares esbuild (^0.27.0 || ^0.28.0) as an optional peer. The root esbuild is 0.17.19 (from wrangler), so npm 10 wants a nested 0.28.2 in the lockfile; npm 11 leaves it out. As a result sdk.gleap.io/latest still serves 19.8.1 from 2026-11-17, while npm has 19.9.0.

Change

File What
package-lock.json npx -y npm@10.9.2 install --ignore-scripts: 27 entries added (esbuild 0.28.2 under vitest/node_modules and its platform packages), 10 Linux binding entries lose npm 11's libc field. Nothing removed, no version changed.
.github/workflows/ci.yml New step before npm ci: npx -y npm@10.9.2 ci --ignore-scripts --dry-run, so a lockfile the CDN deploy cannot install fails the PR instead of the deploy.
AGENTS.md One sentence under "How it ships": the deploy's npm 10, and the command to fill in what it expects.

package.json, src/, index.d.ts, build/, published/, wrangler.jsonc and the release workflow are untouched.

Proof

Check master This branch
npm@10.9.2 ci fails, 28 Missing lines (as in the Cloudflare log) installs, 654 packages
npm@11.19.1 ci installs installs, 652 packages
New CI guard (npm@10.9.2 ci --dry-run) fails passes
Full npm ci + build, sha256 of every file outside node_modules — identical to master except package-lock.json: all bundles in build/ and published/ byte-identical

What a merge ships

Merging deploys master to the CDN for the first time since 2026-11-17: sdk.gleap.io/latest moves from 19.8.1 to 19.9.0. The customer-facing change in it is the one already merged and released on npm: the form's screen recording respects the project's Microphone setting, with the mic off by default (GleapScreenRecorder.js, GleapScreenRecorderMicButton.js, GleapMarkerManager.js).

🤖 Generated with Claude Code

Cloudflare Workers Builds installs with npm 10.9.2 (`npm clean-install`). Since the
lockfile was last written with npm 11, npm 10 rejects it: it expects vitest's nested
vite to get its optional peer esbuild@0.28.2, and npm 11 leaves that out. Every
CDN build since then failed at install, so sdk.gleap.io still serves 19.8.1.

`npx npm@10.9.2 install --ignore-scripts` adds the 27 missing esbuild 0.28.2 entries
and drops npm 11's `libc` field from 10 Linux binding entries; no version changes.
npm 10.9.2 and 11.19.1 both accept the result, and the built bundles are
byte-identical. CI now checks the lockfile with npm 10.9.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@TobiasDuelli
TobiasDuelli marked this pull request as ready for review November 23, 2026 09:35
@TobiasDuelli
TobiasDuelli merged commit d291043 into master Nov 23, 2026
2 checks passed
@TobiasDuelli
TobiasDuelli deleted the fix-lockfile-npm10 branch November 23, 2026 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants