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] Neither --ignore-scripts nor --ignore-prepublish are respected by npm publish #2755
Activity
everhardt commentedon Feb 24, 2021
I think the bug is broader than just
prepublishOnly: if I runnpm publish --ignore-scriptsit also runs thepostpublishscript. I have npm 7.5.3.Fdawgs commentedon Apr 28, 2021
Also encountering this same issue using npm v7.10 with node.js v16.0.0
darkobits commentedon May 11, 2021
#2434 reported this behavior for
npm ci.Per this issue, it's also happening with
publish. Additionally, I'm also seeing it withlink(version7.12.1).jthomas commentedon May 11, 2021
I'm also seeing it with this command:
npm install --production --no-optional --ignore-scriptson npm v7.10 with node.js v16.0.0wraithgar commentedon Jul 1, 2021
--ignore-prepublishis not a valid flag in npm@7--ignore-scriptsbug is fixed in this PR #3495darkobits commentedon Jul 1, 2021
Perhaps slightly off-topic for this issue, but are there plans to make this flag work for all commands for which it was supported in NPM 6?
wraithgar commentedon Jul 1, 2021
If folks are seeing this with OTHER commands, open another issue.
Please be sure that it is not this other bug we are already tracking where git dependencies'
preparescripts are always being ran. #3300wraithgar commentedon Jul 15, 2021
fixed in
v7.20.0Fdawgs commentedon Jul 16, 2021
Thanks @wraithgar!