• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1---
2title: npm-stop
3section: 1
4description: Stop a package
5---
6
7### Synopsis
8
9```bash
10npm stop [-- <args>]
11```
12
13### Description
14
15This runs a predefined command specified in the "stop" property of a
16package's "scripts" object.
17
18Unlike with [npm start](/commands/npm-start), there is no default script
19that will run if the `"stop"` property is not defined.
20
21### Example
22
23```json
24{
25  "scripts": {
26    "stop": "node bar.js"
27  }
28}
29```
30
31```bash
32npm stop
33
34> npm@x.x.x stop
35> node bar.js
36
37(bar.js output would be here)
38
39```
40
41### Configuration
42
43#### `ignore-scripts`
44
45* Default: false
46* Type: Boolean
47
48If true, npm does not run scripts specified in package.json files.
49
50Note that commands explicitly intended to run a particular script, such as
51`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
52will still run their intended script if `ignore-scripts` is set, but they
53will *not* run any pre- or post-scripts.
54
55
56
57#### `script-shell`
58
59* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
60* Type: null or String
61
62The shell to use for scripts run with the `npm exec`, `npm run` and `npm
63init <package-spec>` commands.
64
65
66
67### See Also
68
69* [npm run-script](/commands/npm-run-script)
70* [npm scripts](/using-npm/scripts)
71* [npm test](/commands/npm-test)
72* [npm start](/commands/npm-start)
73* [npm restart](/commands/npm-restart)
74