• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1---
2section: cli-commands
3title: npm-restart
4description: Restart a package
5---
6
7# npm-restart(1)
8
9## Restart a package
10
11### Synopsis
12
13```bash
14npm restart [-- <args>]
15```
16
17### Description
18
19This restarts a package.
20
21This runs a package's "stop", "restart", and "start" scripts, and associated
22pre- and post- scripts, in the order given below:
23
241. prerestart
252. prestop
263. stop
274. poststop
285. restart
296. prestart
307. start
318. poststart
329. postrestart
33
34### Note
35
36Note that the "restart" script is run **in addition to** the "stop"
37and "start" scripts, not instead of them.
38
39This is the behavior as of `npm` major version 2.  A change in this
40behavior will be accompanied by an increase in major version number
41
42### See Also
43
44* [npm run-script](/cli-commands/npm-run-script)
45* [npm scripts](/using-npm/scripts)
46* [npm test](/cli-commands/npm-test)
47* [npm start](/cli-commands/npm-start)
48* [npm stop](/cli-commands/npm-stop)
49* [npm restart](/cli-commands/npm-restart)