circleci-orb icon indicating copy to clipboard operation
circleci-orb copied to clipboard

package manager:PNPM not supported in circleci orb

Open Petra-N opened this issue 1 year ago • 13 comments

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

Petra-N avatar Nov 30 '23 16:11 Petra-N

Any update about this. This would be useful, or at least add more documentation around how to use this with pnpm

ramykl avatar Dec 06 '23 08:12 ramykl

PR to support this in the Node orb, and then we can add it here. https://github.com/CircleCI-Public/node-orb/pull/199

ramykl avatar Dec 06 '23 11:12 ramykl

  • 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

MikeMcC399 avatar Mar 01 '24 12:03 MikeMcC399

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)

LingVuDev avatar Mar 26 '24 19:03 LingVuDev

We are experiencing the same issue. Would be nice if looked at. Screenshot 2024-04-15 at 14 33 13

JuicyBenjamin avatar Apr 15 '24 12:04 JuicyBenjamin

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?

pho3nixf1re avatar May 14 '24 13:05 pho3nixf1re

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?

pho3nixf1re avatar May 14 '24 13:05 pho3nixf1re

Running into the same issue, anyone have any updates on this?

mjameson avatar Jul 22 '24 16:07 mjameson

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)

MikeMcC399 avatar Jul 23 '24 06:07 MikeMcC399

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.

MikeMcC399 avatar Jul 23 '24 06:07 MikeMcC399

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.

MikeMcC399 avatar Jul 23 '24 16:07 MikeMcC399

  • https://github.com/CircleCI-Public/node-orb/pull/199 has now been merged, so this issue should be revisited.

MikeMcC399 avatar Aug 21 '24 14:08 MikeMcC399

Revisited and PR made

ramykl avatar Sep 11 '24 12:09 ramykl