You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] denying a package's install scripts via allowScripts also drops its .bin links #9681
This is not just a request to bump a dependency for a CVE
This is not solely a request to bump a dependency for a CVE
Present on the released npm 11.x (reproduced on 11.17.0). Already fixed on latest (npm 12) by PR #9424, which rewrote the gate as a side effect. So npm 11 still has the bug.
Current Behavior
A package denied in allowScripts ("<pkg>": false) is installed without its node_modules/.bin/<bin> symlinks. The package directory is present and its binary is runnable, but nothing links it onto PATH, so any build step that shells out to the bin fails with command not found (observed with esbuild, nx). Only denied packages that declare a bin are affected.
This is inconsistent with --ignore-scripts, which skips install scripts but still links bins. A per-package allowScripts: false should behave the same — skip the scripts, keep the bins — but it strands the bin links.
Expected Behavior
Denying a package's install scripts must not affect its bin linking. allowScripts: { "<pkg>": false } should skip that package's lifecycle scripts while still creating its node_modules/.bin/<bin> symlinks, matching --ignore-scripts semantics.
Steps To Reproduce
esbuild declares both an install script and a bin, so a name-only deny matches it (registry node) and exposes the drop.
Observed (npm 11.17.0): esbuild is installed under node_modules/esbuild, but node_modules/.bin/ is empty — no esbuild shim. Removing the allowScripts deny restores the bin link, confirming the deny is what drops it.
On latest (npm 12) the same install links .bin/esbuild correctly.
Environment
npm: 11.17.0 (release/v11); fixed on latest (12.0.0-pre.1)
Activity
manzoorwanijk commentedon Jun 27, 2026
CC: @JamieMagee
fix(arborist): keep bin links for allowScripts-denied packages (#9686)
manzoorwanijk commentedon Jun 29, 2026
Fixed via #9686
Opt in to npm v11 supply-chain security features
Opt in to npm v11 supply-chain security features
Opt in to npm v11 supply-chain security features (#79614)
Opt in to npm v11 supply-chain security features (#79614)