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
ERR_PNPM_FROZEN_LOCKFILE_WITH_OUTDATED_LOCKFILE Cannot perform a frozen installation because the lockfile needs updates #6307
Comments
related #6304 |
This behaviour breaks CI workflows. ProblemUsing pnpm install --frozen-lockfile
which breaks CI workflows Expected
Steps to reproducemkdir pnpm8-test
cd pnpm8-test
npm install pnpm@7 -g
pnpm -v
pnpm install webpack
grep lockfileVersion pnpm-lock.yaml
pnpm install --frozen-lockfile produces
Now updating to npm install pnpm@8 -g
pnpm -v
pnpm install --frozen-lockfile produces an error message
The solution is to re-install using pnpm install webpack
grep lockfileVersion pnpm-lock.yaml
pnpm install --frozen-lockfile which shows success
|
https://github.com/pnpm/pnpm/releases/tag/v8.0.0 contains the text: Migration Instructions"Before updating pnpm to v8 in your CI, regenerate your pnpm-lock.yaml. To upgrade your lockfile, run pnpm install and commit the changes. Existing dependencies will not be updated; however, due to configuration changes in pnpm v8, some missing peer dependencies may be added to the lockfile and some packages may get deduplicated. You can commit the new lockfile even before upgrading Node.js in the CI, as pnpm v7 already supports the new lockfile format." so it appears that this issue is not a bug, but intended breaking behaviour. This is different to how Unfortunately when using the GitHub In my instance I modified this to specify
|
In our docs we everywhere suggest to pin the major version of pnpm for CI |
Thanks for your feedback! I have changed the example in README: cypress-io/github-action: pnpm to the following and it is all working again! pnpmThe package manager name: example-basic-pnpm
on: push
jobs:
basic-pnpm:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7
- name: Cypress run
uses: cypress-io/github-action@v5
with:
working-directory: examples/basic-pnpm |
Thanks for the reply, the solution fixed the issue. Just to point out though to others, it must not always be Webpack, you can install another dependency. As for me, I installed nuxt-icons which will come in handy for my project and then proceeded with it. Works well too |
pnpm was updated to print more info, when this error happens. Related PR: #6557 |
Looks like I need to reinstall a package to get the lockfile to migrate - running pnpm i with an up to date lockfile didn't migrate the lockfile for me like I expected |
pnpm version:8.0.0
Code to reproduce the issue:pnpm install
Expected behavior:Work as usual
Actual behavior:
ERR_PNPM_FROZEN_LOCKFILE_WITH_OUTDATED_LOCKFILE Cannot perform a frozen installation because the lockfile needs updates
Note that in CI environments this setting is true by default. If you still need to run install in such cases, use "pnpm install --no-frozen-lockfile"
Additional information:
node -v
prints:18.12.1Upgrading from 7.30.5 to 8.0.0 causes an error, and the fallback version works fine
The text was updated successfully, but these errors were encountered: