Commit 14725e3
SDK-613: fix npm ci in the Next.js examples (yalc sig in lockfile)
The `Install` step (`npm run install:all -- ci`) failed on all three CI
legs:
npm error `npm ci` can only install packages when your package.json
and package-lock.json ... are in sync.
npm error Invalid: lock file's @rollbar/react@1.0.0+7da6e313 does
not satisfy @rollbar/react@1.0.0+d49a5d31
The two lockfiles regenerated for the Next 16 bump recorded
`@rollbar/react` as a *copied* dependency:
"node_modules/@rollbar/react": {
"version": "1.0.0+7da6e313",
"resolved": "file:.yalc/@rollbar/react", ...
That happens under npm 9, whose default for `install-links` is `true`
(npm 10 reverted it to `false`). In copy mode npm pins the version of
the `file:` dependency -- and `install-all.js` publishes the package
with `yalc publish --sig`, so that version carries a build signature
that differs on every machine. Any such lockfile can only ever be
installed on the box that generated it.
Regenerated both with npm 10 / `install-links=false`, which restores
the link form the other examples and `main` already use:
"node_modules/@rollbar/react": {
"resolved": ".yalc/@rollbar/react",
"link": true
The signature now only appears on the `.yalc/@rollbar/react` entry,
which `npm ci` does not verify -- confirmed by rewriting the local
signature to a bogus value and re-running `npm ci`, which succeeds
(main's lockfiles have carried a stale `0.12.0-beta+5817c339` there for
several releases for the same reason).
No dependency versions change. Verified after reinstalling both
examples in link mode: `npm ci`, `eslint .`, `next build` and all six
example tests pass.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 0487fe8 commit 14725e3
2 files changed
Lines changed: 28 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments