Skip to content

Conversation

@m2ux
Copy link
Contributor

@m2ux m2ux commented Dec 8, 2025

Fix CI Error: Yarn Version Mismatch

Resolves CI failures after merging to main where workflows failed with:

error This project's package.json defines "packageManager": "[email protected]". 
However the current global version of Yarn is 1.22.22.

Key Changes

Updated all GitHub Actions workflows to use [email protected] (matching package.json) via Corepack:


Root Cause

The project's package.json specifies "packageManager": "[email protected]", which requires Corepack to be enabled with that exact version. The CI workflows were either:

  1. Not preparing a specific Yarn version (defaulting to system Yarn 1.22.22), or
  2. Using an outdated version ([email protected])

This caused Corepack to reject the version mismatch and fail the build.


Solution

All workflows now explicitly activate [email protected] using:

- name: Enable Corepack
  run: |
    corepack enable
    corepack prepare [email protected] --activate

This ensures consistent dependency management across all CI environments and matches the version declared in package.json.


Testing

  • Workflows updated and committed
  • Changes follow existing workflow patterns
  • Version matches package.json specification

Backward Compatibility

100% backward compatible - This change only affects CI/CD environments, not runtime behavior. All workflows will now use the correct Yarn version as specified in package.json.

- Update prod.yml to prepare [email protected] via corepack before Vercel commands
- Update build.yml from [email protected] to [email protected]
- Update pr.yml from [email protected] to [email protected]
- Update playwright-visual-regression.yml from [email protected] to [email protected]

Fixes CI error: 'This project's package.json defines packageManager: [email protected].
However the current global version of Yarn is 1.22.22.'

All workflows now use corepack to activate the correct Yarn version matching
package.json, ensuring consistent dependency management across CI environments.
@m2ux m2ux requested review from a team as code owners December 8, 2025 09:53
@vercel
Copy link

vercel bot commented Dec 8, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
midnight-wiki Ready Ready Preview Comment Dec 8, 2025 9:58am

@github-actions
Copy link

github-actions bot commented Dec 8, 2025

🚀 Preview Deployment

Deployment Ready

🔗 Preview URL: https://pr-445-midnight-docs.vercel.app

📝 Latest commit: 364416d
Updated: Dec 8, 2025, 9:58 AM UTC


This preview updates automatically when you push new commits to this PR.

@gilescope gilescope merged commit 489c56d into main Dec 8, 2025
9 checks passed
@gilescope gilescope deleted the package_manager_fix branch December 8, 2025 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants