You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The basic issue here is that the error message given by pnpm is misleading when running on a CI; indicating that the lock file has not been updated after changing package.json. When then subsequently running pnpm install locally there are no changes/diff, so it is up to date. The real error is something related to the lock file, but it is not that it is out of sync with the package.json (see details).
The error message sent us on a wild goose chase for quite a while, as we were unable to reproduce the issue, until I found #2378 and checked the source code, which made me understand what was different on the TeamCity server.
Do note that the warning you get when installing locally does make more sense, but not enough for us to understand that the version number was off 😃 "... and failed compatibility check. Excluding it from installation." should rather be something like "Cannot resolve chokidar-cli version 30000.0.0. Excluding from installation".
See that you get the following output when installing it:
# install the deps, creating the lock file
$ npx pnpm i
npx: installerte 1 på 1.751s
info: chokidar-cli@^30000.0.0 is an optional dependency and failed compatibility check. Excluding it from installation.
Already up-to-date
# verify error message is wrong when CI=true
$ CI=true npx pnpm i
npx: installerte 1 på 0.937s
Lockfile is up-to-date, resolution step is skipped
ERR_PNPM_OUTDATED_LOCKFILE Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up-to-date with package.json
Expected behavior:
An error message telling me the version of the chokidar-cli package is not resolvable.
Actual behavior:
ERR_PNPM_OUTDATED_LOCKFILE Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up-to-date with package.json
Additional information:
node -v prints: 14.18 (16 also tried)
macOS and Linux tried
The text was updated successfully, but these errors were encountered:
@zkochan I believe the issue I DM'd you about today is related to this. In my case, including a linked dependency fails in CI but succeeds locally with pnpm install --frozen-lockfile. Dependency shape looks like:
When I removed all link: and swapped to workspace: the error ceased. (I have to use link for the CDK build process I'm using).
What's wild about this particular error is the messaging:
Lockfile is up-to-date, resolution step is skipped
ERR_PNPM_OUTDATED_LOCKFILE Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up-to-date with services/svc-api/package.json
Lockfile is confirmed up to date and then immediate errors that it's out of date.
The basic issue here is that the error message given by
pnpm
is misleading when running on a CI; indicating that the lock file has not been updated after changingpackage.json
. When then subsequently runningpnpm install
locally there are no changes/diff, so it is up to date. The real error is something related to the lock file, but it is not that it is out of sync with the package.json (see details).The error message sent us on a wild goose chase for quite a while, as we were unable to reproduce the issue, until I found #2378 and checked the source code, which made me understand what was different on the TeamCity server.
Do note that the warning you get when installing locally does make more sense, but not enough for us to understand that the version number was off 😃 "... and failed compatibility check. Excluding it from installation." should rather be something like "Cannot resolve chokidar-cli version 30000.0.0. Excluding from installation".
pnpm version: 6.3 - 6.20 (
@latest
) (all versions tried)Code to reproduce the issue:
Create a temporary dir with a
package.json
of this content:See that you get the following output when installing it:
Expected behavior:
An error message telling me the version of the
chokidar-cli
package is not resolvable.Actual behavior:
Additional information:
node -v
prints: 14.18 (16 also tried)The text was updated successfully, but these errors were encountered: