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

package manager:PNPM not supported in circleci orb #442

Closed
Petra-N opened this issue Nov 30, 2023 · 13 comments · Fixed by #485
Closed

package manager:PNPM not supported in circleci orb #442

Petra-N opened this issue Nov 30, 2023 · 13 comments · Fixed by #485
Labels
type: enhancement New feature or request

Comments

@Petra-N
Copy link

Petra-N commented Nov 30, 2023

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

@ramykl
Copy link
Contributor

ramykl commented Dec 6, 2023

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

@ramykl
Copy link
Contributor

ramykl commented Dec 6, 2023

PR to support this in the Node orb, and then we can add it here. CircleCI-Public/node-orb#199

@MikeMcC399
Copy link
Collaborator

See also https://circleci.com/developer/orbs/orb/cypress-io/cypress#usage-pnpm

@LingVuDev
Copy link

LingVuDev commented Mar 26, 2024

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)

@JuicyBenjamin
Copy link

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

@pho3nixf1re
Copy link

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
Copy link

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?

@mjameson
Copy link

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

@MikeMcC399
Copy link
Collaborator

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 #442 (comment), 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
Copy link
Collaborator

Also, as previously mentioned in this thread, @ramykl submitted a PR CircleCI-Public/node-orb#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
Copy link
Collaborator

MikeMcC399 commented Jul 23, 2024

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
Copy link
Collaborator

@ramykl
Copy link
Contributor

ramykl commented Sep 11, 2024

Revisited and PR made

@MikeMcC399 MikeMcC399 added the type: enhancement New feature or request label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
8 participants