microsoft/rushstack

[rush] pnpm 6.x -> 8.x upgrade: how to upgrade lockfile version

robert-irelan-tiktokusds opened this issue · 1 comments

I upgraded "rushVersion" from 5.66.2 to 5.118.7 and "pnpmVersion" from 6.7.1 to 8.15.6 in my rush.json. Now, I cannot use my repository, because rush install and rush update always fail:

Rush Multi-Project Build Tool 5.118.7 - https://rushjs.io
Node.js version is 16.20.2 (LTS)


Trying to acquire lock for pnpm-8.15.8
Acquired lock for pnpm-8.15.8
Found pnpm version 8.15.8 in /home/me/.rush/node-v16.20.2/pnpm-8.15.8

Symlinking "/cloudide/workspace/fe_mono/common/temp/pnpm-local"
  --> "/home/me/.rush/node-v16.20.2/pnpm-8.15.8"
Acquiring lock for "common/autoinstallers/lint-staged" folder...
Deleting old files from /cloudide/workspace/fe_mono/common/autoinstallers/lint-staged/node_modules
Transforming /cloudide/workspace/fe_mono/common/config/rush/.npmrc
  --> "/cloudide/workspace/fe_mono/common/autoinstallers/lint-staged/.npmrc"
Installing dependencies under /cloudide/workspace/fe_mono/common/autoinstallers/lint-staged...

 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

Try either:
1. Aligning the version of pnpm that generated the lockfile with the version that installs from it, or
2. Migrating the lockfile so that it is compatible with the newer version of pnpm, or
3. Using "pnpm install --no-frozen-lockfile".
Note that in CI environments, this setting is enabled by default.
Starting "rush update"

Trying to acquire lock for pnpm-8.15.8
Acquired lock for pnpm-8.15.8
Found pnpm version 8.15.8 in /home/me/.rush/node-v16.20.2/pnpm-8.15.8

Symlinking "/cloudide/workspace/fe_mono/common/temp/pnpm-local"
  --> "/home/me/.rush/node-v16.20.2/pnpm-8.15.8"
Acquiring lock for "common/autoinstallers/lint-staged" folder...
Deleting old files from /cloudide/workspace/fe_mono/common/autoinstallers/lint-staged/node_modules
Transforming /cloudide/workspace/fe_mono/common/config/rush/.npmrc
  --> "/cloudide/workspace/fe_mono/common/autoinstallers/lint-staged/.npmrc"
Installing dependencies under /cloudide/workspace/fe_mono/common/autoinstallers/lint-staged...

 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

Try either:
1. Aligning the version of pnpm that generated the lockfile with the version that installs from it, or
2. Migrating the lockfile so that it is compatible with the newer version of pnpm, or
3. Using "pnpm install --no-frozen-lockfile".
Note that in CI environments, this setting is enabled by default.

ERROR: The command failed with exit code 1

How can I upgrade the lockfile version? I don't want to delete my lockfile.

This is not an issue with rush, but with my repo. I forgot that I have packages in /cloudide/workspace/fe_mono/common/autoinstallers/lint-staged/ with a separate lock file. This package is not managed by rush for whatever reason. I fixed this by running pnpm install --lockfile-only in that package directory.