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

pnpm v10 blocks Cypress binary installation by default #6069

Open
MikeMcC399 opened this issue Jan 7, 2025 · 2 comments · May be fixed by #6072
Open

pnpm v10 blocks Cypress binary installation by default #6069

MikeMcC399 opened this issue Jan 7, 2025 · 2 comments · May be fixed by #6072

Comments

@MikeMcC399
Copy link
Contributor

Description

Issue

[email protected] was released today, 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.

@jennifer-shehane
Copy link
Member

@MikeMcC399 This would be great to update.

@MikeMcC399
Copy link
Contributor Author

MikeMcC399 commented Jan 8, 2025

@jennifer-shehane

This would be great to update.

I found that the Troubleshoot installation instructions could be executed unchanged.

Since the pnpm warning is quite explicit, I didn't add anything to the troubleshooting section. The warning should be self explanatory and any reader of the advanced installation page, where the troubleshooting instructions are located, can be implicitly expected to read the regular installation instructions first and be familiar with them.

The warning is:

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"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants