currents-dev/cypress-cloud

Using pnpm "monorepo" with multiple cypress versions, resolves to wrong cypress binary

Closed this issue · 0 comments

Before opening, please confirm:

  • I have searched for duplicate or closed issues and discussions.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I acknowledge that I will attach a full debug log, otherwise the issue will be closed with no response.

Environment information

# Put output below this line

  System:
    OS: macOS 12.0.1
    CPU: (8) arm64 Apple M1
    Memory: 160.98 MB / 16.00 GB
    Shell: 3.2.57 - /bin/sh
  Binaries:
    Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node
    npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm
  Browsers:
    Chrome: 111.0.5563.146
    Firefox: 110.0
    Safari: 15.1
  npmPackages:
    @vitejs/plugin-vue: ^2.3.1 => 2.3.4 
    cypress: 12.6.0 => 12.6.0 
    cypress-cloud: ^1.7.0 => 1.7.0 
    cypress-fail-fast: ^7.0.0 => 7.0.0 
    cypress-file-upload: ^5.0.8 => 5.0.8 
    cypress-real-events: ^1.7.6 => 1.7.6 
    cypress-terminal-report: ^5.0.2 => 5.0.2 
    typescript: ~4.9.4 => 4.9.5 
    vite: ^2.9.2 => 2.9.15 
    vue: ^3.2.25 => 3.2.45 
    vue-dompurify-html: ^3.1.2 => 3.1.2 
    vue-router: ^4.1.6 => 4.1.6 
    vue-select: 4.0.0-beta.6 => 4.0.0-beta.6 
    vue-tsc: ^0.34.7 => 0.34.17 
    vue-virtual-scroller: 2.0.0-beta.8 => 2.0.0-beta.8 
    vuex: ^4.1.0 => 4.1.0 
  npmGlobalPackages:
    corepack: 0.15.1
    npm: 8.5.0
    smee-client: 1.2.3

Describe the bug

When using pnpm with multiple "repos"/"packages", where each has a different Cypress version, resolving of Cypress binary can sometimes resolve to the wrong version (first hit?)
My teammate believes he has a solution: #116

Expected behavior

Resolving to the same version that cypress-cloud is running from

Command and Setup

pnpm cypress-cloud --component --record --parallel --ci-build-id my-build-id --key my-key

Full log and debug output

doing pnpm cypress install works correctly and takes the correct version:
image

while one step after gives that: (8.5.0)

2023-04-04T12:03:29.078Z currents:config resolving cypress config
2023-04-04T12:03:29.078Z currents:boot booting cypress...
2023-04-04T12:03:[29](https://github.com/swimmio/swimm/actions/runs/runId/jobs/jobId#step:7:30).083Z currents:boot cypress executable location: /home/runner/work/swimm/swimm/node_modules/.pnpm/cypress@8.5.0/node_modules/cypress/bin/cypress
2023-04-04T12:03:29.086Z currents:boot cypress bootstrap params: { record: false, component: true, env: { currents_temp_file: '/tmp/tmp-1866-wquU92jsti75', currents_port: 37169, currents_debug_enabled: true } }