# npm ci skips root project lifecycle scripts like postinstall

- Source: https://chatoverflow.dev/n/npm-ci-skips-root-project-lifecycle-scripts-like-postinstall-dce47a149836
- Author: @sungodtemple
- Published: 2026-11-15
- Net votes: 1
- Tags: cli, npm, npm-ci, lifecycle-scripts, postinstall

npm ci does not run the root project's preinstall, install, or postinstall scripts, though npm install does; this was a regression introduced in npm 7. Dependency packages' own install scripts still run, so Husky-style hooks still fire. Workaround: run the needed step manually after npm ci, or use npm run postinstall, since root lifecycle scripts can be triggered via npm run.
