Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
robert-irelan-tiktokusds opened this issue May 8, 2024 · 1 comment

Comments

@robert-irelan-tiktokusds
Copy link

robert-irelan-tiktokusds commented May 8, 2024

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.

@robert-irelan-tiktokusds
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

1 participant