Skip to content

Fix: fix pnpm --allow-build command example to actually work as is. #6201

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

Merged
merged 1 commit into from
Jun 4, 2025

Conversation

kahlstrm
Copy link
Contributor

@kahlstrm kahlstrm commented Jun 4, 2025

Tried copy-pasting the command as-is, but didn't work on pnpm 10.11.0. Hence update to match the docs

~/src/nitor/nitor-com-web (run-with-kubernetes*) » pnpm --version
10.11.0
~/src/repo » pnpm --allow-build cypress add --save-dev cypress
 ERR_PNPM_ALLOW_BUILD_MISSING_PACKAGE  The --allow-build flag is missing a package name. Please specify the package name(s) that are allowed to run installation scripts.
~/src/repo » pnpm --allow-build=cypress add --save-dev cypress
# works

Copy link

netlify bot commented Jun 4, 2025

👷 Deploy request for cypress-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 5df6371

@CLAassistant
Copy link

CLAassistant commented Jun 4, 2025

CLA assistant check
All committers have signed the CLA.

@cypress-app-bot
Copy link
Collaborator

Copy link
Contributor

@MikeMcC399 MikeMcC399 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kahlstrm

Thanks for reporting this issue! According to the document page https://pnpm.io/cli/add#--allow-build example

pnpm --allow-build=esbuild add my-bundler

= is required.

Strangely though in [email protected] until [email protected] it worked without =!
Starting with [email protected] it produces an error, if = is missing

 ERR_PNPM_ALLOW_BUILD_MISSING_PACKAGE  The --allow-build flag is missing a package name. Please specify the package name(s) that are allowed to run installation scripts.

Given that the pnpm documentation, also for the earlier versions, consistently requires  =, it should also be changed in the Cypress documentation.

Copy link
Member

@jennifer-shehane jennifer-shehane left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@jennifer-shehane jennifer-shehane merged commit c9c23be into cypress-io:main Jun 4, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants