action-setup: Error in CI: ERR_PNPM_FROZEN_LOCKFILE_WITH_OUTDATED_LOCKFILE Cannot perform a frozen installation because the lockfile needs updates
My Action Step is `
uses: pnpm/action-setup@v2.2.1
with:
version: 6.x
run_install: true
`
I am getting below error when running this action
Error in CI: ERR_PNPM_FROZEN_LOCKFILE_WITH_OUTDATED_LOCKFILE Cannot perform a frozen installation because the lockfile needs updates
and when try to fix my lockfile locally with command npm i --fix-lockfile
i get following error:
`
npm i --fix-lockfile
npm ERR! Cannot read properties of null (reading ‘matches’)
npm ERR! A complete log of this run can be found in: npm ERR! /Users/un/.npm/_logs/2022-05-01T10_32_11_056Z-debug-0.log `
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 5
- Comments: 23 (1 by maintainers)
Commits related to this issue
- Update pnpm-lock.yaml for pnpm v8 — committed to gethomepage/homepage by shamoon a year ago
- upgrade pnpm to v8 https://github.com/pnpm/action-setup/issues/40#issuecomment-1487053071 — committed to atahrijouti/atahrijouti.github.io by atahrijouti a year ago
- pin all deps explicitly and update them (#54) * pin all deps explicitly and update them * do it the right way 🤷♂️ * fix lockfile * pnpm update * λ pnpm install --fix-lockfile * upgra... — committed to atahrijouti/atahrijouti.github.io by atahrijouti a year ago
@jyono The spike is probably related to the pnpm v8 release just a few hours ago, which seems to require a new lockfile version when installing with
--frozen-lockfile
(which some CI/CD environments default to).We ran into this issue too, because our CI/CD was pulling the latest
pnpm
version. Earlier today, that was v7, until this switched to v8, breaking our builds due to the unsupported lockfile version.Locally installing pnpm v8 and updating the lockfile (as per above posts) worked.
Alternatively, you can also fix your pnpm version to
pnpm@^7
and stick with the old lockfile.You need to update pnpm before running it 😃
same problem today. this worked for us.
corepack prepare pnpm@latest --activate
corepack enable
pnpm -v
should see 8.0.0pnpm i --fix-lockfile
not sure exactly what caused this but maybe something upstream? it feels suspicious that this issue had comments September 2022 and now there’s a lot more traffic today…
Same here. Upgraded from pnpm v7 to v8 and fixing the lock file using the
--fix-lockfile
option fixed the issueYeah, I was on v7.30.1. After upgrading to v8, I can confirm that running
--fix-lockfile
fixed the issue.Thanks for your help, @ramnes.
Same error! Running
pnpm i --fix-lockfile
does not change the lockfile, but in CI I keep getting an error.This is with a project that has a peer dependency listed like this:
I guess the takeaway from this issue is to always use specific versions of external dependencies in CI.
Just encountered the same issue in Azure Pipelines. I can also confirm that updating from pnpm 7 to 8 and fixing the lockfile again worked for me.
Can you try
pnpm i --fix-lockfile
?