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
The cheat sheet recommends adding ignore-scripts=true to .npmrc. In an npm workspaces monorepo, this only works in the .npmrc at the workspace root. npm does not read a .npmrc inside a workspace folder (npm/cli#4605, closed as intended):
A root npm install ignores that file without any warning and still runs lifecycle scripts.
Commands run from inside the workspace folder only log ignoring workspace config at <path>/.npmrc (source).
I reproduced this on npm 10.9.9 and 12.2.3. A team that follows the current advice per package in a monorepo gets no protection and no warning.
How should this be resolved?
Add one bullet right after the ignore-scripts=true recommendation: in an npm workspaces monorepo, put the setting in the .npmrc at the repository root, with links to npm/cli#4605 and the npm source above. No other changes.
If this is approved, I will open a pull request for this single file that references this issue.
AI disclosure: an AI tool (Claude) helped draft this text. The npm behavior was reproduced and checked manually.
Thanks @cryptostrapon, this is a useful clarification. The existing advice to set ignore-scripts in a project .npmrc does not hold for workspace folders in an npm monorepo, so a short note next to that recommendation makes sense. Please go ahead with a pull request that changes only this file and references this issue.
Activity
mackowski commentedon Nov 23, 2026
Thanks @cryptostrapon, this is a useful clarification. The existing advice to set ignore-scripts in a project .npmrc does not hold for workspace folders in an npm monorepo, so a short note next to that recommendation makes sense. Please go ahead with a pull request that changes only this file and references this issue.