Hacker News new | ask | show | jobs
by nicce 51 days ago
Great reminder to always disable these scripts unless going through the hassle to verify if it does something absolutely useful.
1 comments

Use pnpm!
Every node package manager disables preinstall scripts by default now!
You need to explicitly update npm to 12 before this is true in Node.
That's no longer necessary for security; npm doesn't run install scripts by default anymore.
Pnpm is still better in every way.
Default npm version is still 11 on every Node install. Almost there, but not yet!
Huh, I already got the new behavior last time I tried this, and I didn't manually enable it. I wonder why.
You will get the warnings but default npm in Node will still run the scripts.

npm 12 has the relevant breaking changes: https://github.blog/changelog/2026-06-09-upcoming-breaking-c...

Node 27 will likely ship with it:

https://github.com/nodejs/Release/issues/1161

https://github.com/npm/cli/issues/9997