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

frozen-lockfile fails in CI environment using the latest pnpm version #5187

Closed
aholtkamp opened this issue Aug 9, 2022 · 7 comments
Closed

Comments

@aholtkamp
Copy link

aholtkamp commented Aug 9, 2022

Possibly related to #5124 but the problem is not fixed for us. Maybe this is even intended?

pnpm version:

7.9.0

Code to reproduce the issue:

  • Have a package.json containing some dependencies and a "publishConfig" -> "directory" entry
  • Install pnpm 7.1.5
  • Execute: pnpm install
  • Upgrade to pnpm 7.9.0
  • Execute: pnpm install --frozen-lockfile

Expected behavior:

The installation works. No error or non-zero exit code.

Actual behavior:

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

Exit Code: 1

Additional information:

  • node -v prints: v16.15.0
  • Linux
@zkochan
Copy link
Member

zkochan commented Aug 9, 2022

Do you use auto-install-peers=true?

@aholtkamp
Copy link
Author

No, auto-install-peers is not set.

@zkochan
Copy link
Member

zkochan commented Aug 10, 2022

So the issue is that we added the publishDirectory field to the lockfile. You probably just need to update your lockfile.

@aholtkamp
Copy link
Author

aholtkamp commented Aug 10, 2022

Hm...ok. Our CI usually uses the latest PNPM 7.x version. I assume this is then not recommended as the build might suddenly fail? Would you suggest always using a fixed version of pnpm in CI environments?

@zkochan
Copy link
Member

zkochan commented Aug 10, 2022

It is your choice. I try to not cause such issues but of course pinning the version is the most reliable solution.

@aholtkamp
Copy link
Author

Thanks, this issue can be considered solved.

aholtkamp added a commit to CoreMedia/content-hub-adapter-rss that referenced this issue Aug 10, 2022
- utilize pnpm/action-setup in conjunction with actions/setup-node to be able to cache
- pin used pnpm version to avoid build problems in case the lockfile format has changed (see pnpm/pnpm#5187)
@pitgrap
Copy link
Contributor

pitgrap commented Aug 11, 2022

Changing the pnpm-lock.yaml format is imho the most breaking change a package manager can do (like the one from 6 to 7). I would expect a 8.x release for that.
It would be nice to not pin the version in CI (because of manually update all references all the time), but expect a stable ci build and lock-file within a major version. @zkochan, please consider this.

rreich added a commit to CoreMedia/content-hub-adapter-youtube that referenced this issue Aug 11, 2022
- utilize pnpm/action-setup in conjunction with actions/setup-node to be able to cache
- pin used pnpm version to avoid build problems in case the lockfile format has changed (see pnpm/pnpm#5187)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants