Skip to content
Discussion options

You must be logged in to vote

The premise appears to mix two npm 12 settings. In npm 12, ignore-scripts still defaults to false; the security change blocks unapproved dependency install scripts.

Root lifecycle scripts are intentionally outside npm approve-scripts. A normal npm install or npm ci still runs the root "prepare": "husky" unless ignore-scripts=true was explicitly configured. Husky itself has no lifecycle installer script to approve.

If your organization deliberately enforces ignore-scripts=true, allowScripts cannot override it. Use an explicit trusted step:

npm ci --ignore-scripts
npm run prepare

A trusted repository can alternatively set ignore-scripts=false in its project .npmrc, subject to npm config pre…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by xdsl93
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants