Skip to content

Yarn Modern (3) using default pnp hangs at Initializing config... #26676

Description

@MikeMcC399

Current behavior

After installing Cypress with Yarn Modern (3.5.1) using the default Yarn Plug'n'Play the first start of cypress open hangs at "Initializing config..." after selecting E2E Testing.

Edit: The issue also affects Component Testing. I have however only given repro steps for the simpler case of E2E Testing.

Desired behavior

If the app finds configuration errors it should not hang. Instead it should output an error message.

After opening the Cypress app for the first time, it should provide default configuration parameters and allow selection of example tests.

Test code to reproduce

Execute the following in a bash terminal window:

mkdir cy-yarn-pnp
cd cy-yarn-pnp
npm install yarn@latest -g
yarn init -y
yarn set version berry # finds and installs 3.5.1
yarn add cypress@latest -D -E
yarn cypress open

Select E2E Testing
Click Continue (to accept addition of cypress.config.js, cypress/support/e2e.js, cypress/support/commands.js and cypress/fixtures/example.json)

image

Note that .yarnrc.yml contains only:

yarnPath: .yarn/releases/yarn-3.5.1.cjs

Cypress Version

12.11.0

This issue is a regression from Cypress 12.9.0.

Node version

18.16.0

Operating System

Ubuntu 22.04

Debug Logs

Debug logs go into an endless loop including

'Error', message: 'Your configFile is invalid: /xxx/github/cy-yarn-pnp/cypress.config.js\n'

Other

Workaround

Revert to Cypress 12.9.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CTIssue related to component testingTriagedIssue has been routed to backlog. This is not a commitment to have it prioritized by the team.

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions