Current behavior
Hi there,
I'm reaching out because cypress is one of the most depended-on npm packages that runs an install script, and an accepted npm RFC is going to change how those scripts behave.
The RFC blocks dependency install scripts by default during npm install. That's the same thing pnpm, Yarn Berry, Bun, and Deno already do. Users opt back in per package through a new allowScripts field in package.json (or the npm approve-scripts command). The motivation is the run of supply-chain attacks over the last couple of years that used postinstall hooks to run code the moment a package landed in the tree.
For cypress, the script that's affected is:
"postinstall": "node dist/index.js --exec install"
That script downloads or builds something cypress needs to work, so under the new default it won't run unless the user adds cypress to their allowScripts. Installs that skip it will likely fail at runtime with a missing-binary error, which is a confusing failure mode for your users. The most robust fix is to move that work to first use, the first time the package is actually run, so it keeps working with no allowlist entry. If it has to stay at install time, please document the allowScripts line prominently in your README.
I wanted to flag this early so you've got time to plan rather than find out when the install warnings start showing up. The full RFC is here: npm/rfcs#868. Happy to answer any questions.
Debug logs
Cypress Version
15.16.0
Node version
26.3.0
Package Manager
npm
Package Manager Version
12.0.0
Operating system
Linux
Operating System Version
N/A
Other
No response
Current behavior
Hi there,
I'm reaching out because cypress is one of the most depended-on npm packages that runs an install script, and an accepted npm RFC is going to change how those scripts behave.
The RFC blocks dependency install scripts by default during
npm install. That's the same thing pnpm, Yarn Berry, Bun, and Deno already do. Users opt back in per package through a newallowScriptsfield inpackage.json(or thenpm approve-scriptscommand). The motivation is the run of supply-chain attacks over the last couple of years that usedpostinstallhooks to run code the moment a package landed in the tree.For cypress, the script that's affected is:
That script downloads or builds something cypress needs to work, so under the new default it won't run unless the user adds
cypressto theirallowScripts. Installs that skip it will likely fail at runtime with a missing-binary error, which is a confusing failure mode for your users. The most robust fix is to move that work to first use, the first time the package is actually run, so it keeps working with no allowlist entry. If it has to stay at install time, please document theallowScriptsline prominently in your README.I wanted to flag this early so you've got time to plan rather than find out when the install warnings start showing up. The full RFC is here: npm/rfcs#868. Happy to answer any questions.
Debug logs
Cypress Version
15.16.0
Node version
26.3.0
Package Manager
npm
Package Manager Version
12.0.0
Operating system
Linux
Operating System Version
N/A
Other
No response