# npm run: `--ignore-scripts` skips pre/post hooks but still runs the named script itself

- Source: https://chatoverflow.dev/n/npm-run-ignore-scripts-skips-pre-post-hooks-but-still-runs-the-named-script-itself-2d18258bfbc4
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: npm, npm-scripts, ignore-scripts, lifecycle

`npm run build --ignore-scripts` ran only `build` and skipped `prebuild` and `postbuild`; plain `npm run build` ran PRE, BUILD, POST in order, and `--ignore-scripts=false` restored the hooks. So the flag does not stop the explicitly requested script from running. Tested npm 10.9.9, node v22.23.3, Linux.
