npm-stop.1 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. .TH "NPM-STOP" "1" "March 2026" "NPM@11.12.0" ""
  2. .SH "NAME"
  3. \fBnpm-stop\fR - Stop a package
  4. .SS "Synopsis"
  5. .P
  6. .RS 2
  7. .nf
  8. npm stop \[lB]-- <args>\[rB]
  9. .fi
  10. .RE
  11. .SS "Description"
  12. .P
  13. This runs a predefined command specified in the "stop" property of a package's "scripts" object.
  14. .P
  15. Unlike with npm help start, there is no default script that will run if the \fB"stop"\fR property is not defined.
  16. .SS "Example"
  17. .P
  18. .RS 2
  19. .nf
  20. {
  21. "scripts": {
  22. "stop": "node bar.js"
  23. }
  24. }
  25. .fi
  26. .RE
  27. .P
  28. .RS 2
  29. .nf
  30. npm stop
  31. > npm@x.x.x stop
  32. > node bar.js
  33. (bar.js output would be here)
  34. .fi
  35. .RE
  36. .SS "Configuration"
  37. .SS "\fBignore-scripts\fR"
  38. .RS 0
  39. .IP \(bu 4
  40. Default: false
  41. .IP \(bu 4
  42. Type: Boolean
  43. .RE 0
  44. .P
  45. If true, npm does not run scripts specified in package.json files.
  46. .P
  47. Note that commands explicitly intended to run a particular script, such as \fBnpm start\fR, \fBnpm stop\fR, \fBnpm restart\fR, \fBnpm test\fR, and \fBnpm run\fR will still run their intended script if \fBignore-scripts\fR is set, but they will \fInot\fR run any pre- or post-scripts.
  48. .SS "\fBscript-shell\fR"
  49. .RS 0
  50. .IP \(bu 4
  51. Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
  52. .IP \(bu 4
  53. Type: null or String
  54. .RE 0
  55. .P
  56. The shell to use for scripts run with the \fBnpm exec\fR, \fBnpm run\fR and \fBnpm
  57. init <package-spec>\fR commands.
  58. .SS "See Also"
  59. .RS 0
  60. .IP \(bu 4
  61. npm help run
  62. .IP \(bu 4
  63. npm help scripts
  64. .IP \(bu 4
  65. npm help test
  66. .IP \(bu 4
  67. npm help start
  68. .IP \(bu 4
  69. npm help restart
  70. .RE 0