circleci-orb
circleci-orb copied to clipboard
package manager:PNPM not supported in circleci orb
Hey all, Just wanted to ask, when will circleci orb support pnpm as well. Currently working on a project which is using pnpm, would like to run cypress in ci and it would be definitely easier if pnpm would be supported as well.
Thanks a lot! Petra
Any update about this. This would be useful, or at least add more documentation around how to use this with pnpm
PR to support this in the Node orb, and then we can add it here. https://github.com/CircleCI-Public/node-orb/pull/199
- It seems that this issue was addressed in PR https://github.com/cypress-io/circleci-orb/pull/452
See also https://circleci.com/developer/orbs/orb/cypress-io/cypress#usage-pnpm
The error message still remains as the underlying node orb does not support pnpm
in it's enum.
start-command: pnpm dev
install-command: pnpm install
package-manager: pnpm
Type error for argument pkg-manager: expected type: enum ("npm" "yarn" "yarn-berry"), actual value: "pnpm" (type string)
We are experiencing the same issue. Would be nice if looked at.
Is this simply a matter of adding pnpm to the enum or is there more that needs to be done? If so I can submit a PR today if we can get a release out quickly. This has become a big blocker for my team and I would like to have it resolved quickly if possible.
For others that may come along here in the future, can we bypass this limitation by using cypress/run-tests
directly?
I see now that this is actually an issue with the official node
orb which does not support pnpm. Has anyone found a way around this issue?
Running into the same issue, anyone have any updates on this?
The documented Usage Examples > pnpm does not work:
version: '2.1'
orbs:
cypress: cypress-io/cypress@3
workflows:
use-my-orb:
jobs:
- cypress/run:
install-command: pnpm install --frozen-lockfile
package-manager: pnpm
start-command: pnpm start
As previously posted in https://github.com/cypress-io/circleci-orb/issues/442#issuecomment-2056747396, it results in a CircleCI pipeline error message (reposted as text for better searchability):
Error calling workflow: 'use-my-orb'
Error calling job: 'cypress/run'
Error calling command: 'install'
Error calling command: 'node/install-packages'
Type error for argument pkg-manager: expected type: enum ("npm" "yarn" "yarn-berry"), actual value: "pnpm" (type string)
Also, as previously mentioned in this thread, @ramykl submitted a PR https://github.com/CircleCI-Public/node-orb/pull/199 to add pnpm
support to the circleci/node orb, however the only people responding to this PR are former CircleCI employees and the PR is otherwise stuck for the last 6 months or so.
This is an example of using pnpm with the Cypress CircleCI Orb and Cypress Docker images:
version: 2.1
orbs:
cypress: cypress-io/cypress@3
executors:
cypress-browsers:
docker:
- image: cypress/browsers:node-20.15.1-chrome-126.0.6478.126-1-ff-128.0-edge-126.0.2592.102-1
jobs:
pnpm-chrome-test:
executor: cypress-browsers
steps:
- checkout
- run: npm install -g pnpm@9
- run: pnpm install --frozen-lockfile
- cypress/run-tests:
cypress-command: 'npx cypress run --browser chrome'
start-command: pnpm start
workflows:
test:
jobs:
- pnpm-chrome-test
The above example is not optimized for caching, however it does work.
The non-working example on https://circleci.com/developer/orbs/orb/cypress-io/cypress#usage-pnpm should be removed.
- https://github.com/CircleCI-Public/node-orb/pull/199 has now been merged, so this issue should be revisited.
Revisited and PR made