11cb0ef41Sopenharmony_ci---
21cb0ef41Sopenharmony_cititle: npm-stop
31cb0ef41Sopenharmony_cisection: 1
41cb0ef41Sopenharmony_cidescription: Stop a package
51cb0ef41Sopenharmony_ci---
61cb0ef41Sopenharmony_ci
71cb0ef41Sopenharmony_ci### Synopsis
81cb0ef41Sopenharmony_ci
91cb0ef41Sopenharmony_ci```bash
101cb0ef41Sopenharmony_cinpm stop [-- <args>]
111cb0ef41Sopenharmony_ci```
121cb0ef41Sopenharmony_ci
131cb0ef41Sopenharmony_ci### Description
141cb0ef41Sopenharmony_ci
151cb0ef41Sopenharmony_ciThis runs a predefined command specified in the "stop" property of a
161cb0ef41Sopenharmony_cipackage's "scripts" object.
171cb0ef41Sopenharmony_ci
181cb0ef41Sopenharmony_ciUnlike with [npm start](/commands/npm-start), there is no default script
191cb0ef41Sopenharmony_cithat will run if the `"stop"` property is not defined.
201cb0ef41Sopenharmony_ci
211cb0ef41Sopenharmony_ci### Example
221cb0ef41Sopenharmony_ci
231cb0ef41Sopenharmony_ci```json
241cb0ef41Sopenharmony_ci{
251cb0ef41Sopenharmony_ci  "scripts": {
261cb0ef41Sopenharmony_ci    "stop": "node bar.js"
271cb0ef41Sopenharmony_ci  }
281cb0ef41Sopenharmony_ci}
291cb0ef41Sopenharmony_ci```
301cb0ef41Sopenharmony_ci
311cb0ef41Sopenharmony_ci```bash
321cb0ef41Sopenharmony_cinpm stop
331cb0ef41Sopenharmony_ci
341cb0ef41Sopenharmony_ci> npm@x.x.x stop
351cb0ef41Sopenharmony_ci> node bar.js
361cb0ef41Sopenharmony_ci
371cb0ef41Sopenharmony_ci(bar.js output would be here)
381cb0ef41Sopenharmony_ci
391cb0ef41Sopenharmony_ci```
401cb0ef41Sopenharmony_ci
411cb0ef41Sopenharmony_ci### Configuration
421cb0ef41Sopenharmony_ci
431cb0ef41Sopenharmony_ci#### `ignore-scripts`
441cb0ef41Sopenharmony_ci
451cb0ef41Sopenharmony_ci* Default: false
461cb0ef41Sopenharmony_ci* Type: Boolean
471cb0ef41Sopenharmony_ci
481cb0ef41Sopenharmony_ciIf true, npm does not run scripts specified in package.json files.
491cb0ef41Sopenharmony_ci
501cb0ef41Sopenharmony_ciNote that commands explicitly intended to run a particular script, such as
511cb0ef41Sopenharmony_ci`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
521cb0ef41Sopenharmony_ciwill still run their intended script if `ignore-scripts` is set, but they
531cb0ef41Sopenharmony_ciwill *not* run any pre- or post-scripts.
541cb0ef41Sopenharmony_ci
551cb0ef41Sopenharmony_ci
561cb0ef41Sopenharmony_ci
571cb0ef41Sopenharmony_ci#### `script-shell`
581cb0ef41Sopenharmony_ci
591cb0ef41Sopenharmony_ci* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
601cb0ef41Sopenharmony_ci* Type: null or String
611cb0ef41Sopenharmony_ci
621cb0ef41Sopenharmony_ciThe shell to use for scripts run with the `npm exec`, `npm run` and `npm
631cb0ef41Sopenharmony_ciinit <package-spec>` commands.
641cb0ef41Sopenharmony_ci
651cb0ef41Sopenharmony_ci
661cb0ef41Sopenharmony_ci
671cb0ef41Sopenharmony_ci### See Also
681cb0ef41Sopenharmony_ci
691cb0ef41Sopenharmony_ci* [npm run-script](/commands/npm-run-script)
701cb0ef41Sopenharmony_ci* [npm scripts](/using-npm/scripts)
711cb0ef41Sopenharmony_ci* [npm test](/commands/npm-test)
721cb0ef41Sopenharmony_ci* [npm start](/commands/npm-start)
731cb0ef41Sopenharmony_ci* [npm restart](/commands/npm-restart)
74