Repository navigation
Fix CI workflows: migrate from npm to pnpm for monorepo compatibility - #24
Conversation
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR fixes failing CI workflows caused by a package manager mismatch. The repository uses pnpm with workspace protocol dependencies, but two workflows (code-quality.yml and release.yml) were still configured for npm, causing EUNSUPPORTEDPROTOCOL errors. The changes migrate these workflows from npm to pnpm, aligning them with the existing ci.yml workflow and the package.json engines requirement.
Changes:
- Migrated
.github/workflows/code-quality.ymlfrom npm to pnpm - Migrated
.github/workflows/release.ymlfrom npm to pnpm, including updating the release archive to bundle pnpm lockfiles instead of npm lockfiles
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/workflows/code-quality.yml |
Added pnpm setup step, updated cache and all package manager commands from npm to pnpm |
.github/workflows/release.yml |
Added pnpm setup step, updated cache, all package manager commands from npm to pnpm, and updated release archive to include pnpm-lock.yaml and pnpm-workspace.yaml instead of package-lock.json |
| pnpm-lock.yaml \ | ||
| pnpm-workspace.yaml \ |
There was a problem hiding this comment.
The release archive now correctly includes pnpm-lock.yaml and pnpm-workspace.yaml instead of package-lock.json. However, the .github/labeler.yml file still references package-lock.json in line 10 and should be updated to include pnpm-lock.yaml and pnpm-workspace.yaml for the dependencies label to trigger correctly. Consider updating that file in a follow-up or this PR.
Description
CI workflows failing with
EUNSUPPORTEDPROTOCOLerror. Repository uses pnpm monorepo withworkspace:*dependencies, but workflows configured for npm. npm doesn't support workspace protocol.Type of Change
Related Issues
Related to https://github.com/hotcrm/hotcrm/actions/runs/21393474276/job/61589426880
Changes Made
.github/workflows/code-quality.ymlpnpm/action-setup@v4with version 9npm→pnpmnpm ci→pnpm install --frozen-lockfilenpm run→pnpm run.github/workflows/release.ymlpnpm/action-setup@v4with version 9npm→pnpmnpm ci→pnpm install --frozen-lockfilenpm run→pnpm runpnpm-lock.yamlandpnpm-workspace.yamlinstead ofpackage-lock.jsonAligns with existing
ci.ymlwhich already uses pnpm.Testing
npm test)npm run lint)npm run build)Screenshots
N/A - Workflow configuration changes only
Checklist
Additional Notes
Package manager mismatch only affects CI workflows. Local development already uses pnpm per
package.jsonengines requirement (pnpm>=9.0.0).Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.