Skip to content

pnpm v10 blocks Cypress binary installation by default #6069

@MikeMcC399

Description

@MikeMcC399

Description

Issue

[email protected] was released Jan 7, 2025 and includes a breaking change:

Lifecycle scripts of dependencies are not executed during installation by default!

The installation instructions for Cypress with pnpm

pnpm add --save-dev cypress

are no longer sufficient to install the Cypress binary together with the cypress npm module.

This affects also the Troubleshoot installation instructions.

Logs

$ pnpm add --save-dev cypress
Packages: +173
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Progress: resolved 173, reused 173, downloaded 0, added 173, done

devDependencies:
+ cypress 13.17.0

The following dependencies have build scripts that were ignored: cypress
To allow the execution of build scripts for these packages, add their names to "pnpm.onlyBuiltDependencies" in your "package.json", then run "pnpm rebuild"

Done in 11.4s

Alternatives

Add exception

Add cypress to the exception list for pnpm life cycle scripts in package.json:

  "pnpm": {
    "onlyBuiltDependencies": ["cypress"]
  }

Install Cypress binary manually

pnpm add --save-dev cypress
pnpm cypress install

This allows Cypress to run, however pnpm will continue to output the warning message about ignored build scripts.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions