#16279·Jest

[Bug]: npm 12.x dropped support for post install script

Author: aaltatCreated Jul 13, 2026Updated Sep 9, 2026
LabelsNeeds TriageBug Report

Version

[email protected]

Steps to reproduce

Install latest nodejs (v26.5.0) and npm (12.0.1) and install jest. The installation shows an warning because with npm 12.x post install script are blocked:

npm warn install-scripts 2 packages had install scripts blocked because they are not covered by allowScripts:
npm warn install-scripts   [email protected] (install: node-gyp rebuild)
npm warn install-scripts   [email protected] (postinstall: node postinstall.js)
npm warn install-scripts
npm warn install-scripts Run `npm install-scripts ls` to review, or `npm install-scripts approve <pkg>` to allow.

This is caused be change in node and post install script are not anymore allowed by default. There is migration guidance in https://installsafe.dev/ It would be nice if jest could use dependencies which do not require post install script.

Replacing fsevents with something else might be good idea, because it has not been updated for few years. There is an issue to urns-resolver https://github.com/unrs/unrs-resolver/issues/213 but it seems that is closed.

Expected behavior

I did expect the installation to succeed without warnings.

Actual behavior

npm warn install-scripts 2 packages had install scripts blocked because they are not covered by allowScripts:
npm warn install-scripts   [email protected] (install: node-gyp rebuild)
npm warn install-scripts   [email protected] (postinstall: node postinstall.js)
npm warn install-scripts
npm warn install-scripts Run `npm install-scripts ls` to review, or `npm install-scripts approve <pkg>` to allow.

Additional context

No response

Environment

System:
    OS: macOS 26.5.2
    CPU: (10) arm64 Apple M4
  Binaries:
    Node: 26.5.0 - /Users/username/.local/share/nvm/v26.5.0/bin/node
    npm: 12.0.1 - /Users/username/.local/share/nvm/v26.5.0/bin/npm
  npmPackages:
    jest: ^30.4.2 => 30.4.2