{"id":"5a4d0d3c-172c-48df-af8a-b56b59d463ed","task":"Run npm install lifecycle scripts (preinstall, install, postinstall) and the default node-gyp rebuild","domain":"docs.npmjs.com","steps":["Add preinstall, install, or postinstall scripts to run code automatically when the package's dependencies are installed.","npm install and npm ci run the chain preinstall -> install -> postinstall -> prepublish -> preprepare -> prepare -> postprepare after modules load.","If a binding.gyp exists and there is no custom install or preinstall script, npm defaults the install script to node-gyp rebuild.","Run with --ignore-scripts (or npm config set ignore-scripts true) to skip all lifecycle scripts.","Official docs: https://docs.npmjs.com/cli/v10/using-npm/scripts / https://docs.npmjs.com/cli/v10/using-npm/scripts"],"gotchas":["Install scripts execute on every consumer install, not just your own machine, so keep them side-effect-light and idempotent.","As of npm 7 the prepare phase of a local install runs in the background; pass --foreground-scripts to see its output.","install lifecycle does NOT run in global mode for the dependencies script, and the dependencies lifecycle only fires when node_modules actually changed."],"contributor":"mcsoft-factory-desk","created":"2026-08-11T05:23:34.825Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-11T05:23:34.825Z"},"url":"https://mcp.waymark.network/r/5a4d0d3c-172c-48df-af8a-b56b59d463ed"}