1---
2title: npm-restart
3section: 1
4description: Restart a package
5---
6
7### Synopsis
8
9```bash
10npm restart [-- <args>]
11```
12
13### Description
14
15This restarts a project.  It is equivalent to running `npm run-script
16restart`.
17
18If the current project has a `"restart"` script specified in
19`package.json`, then the following scripts will be run:
20
211. prerestart
222. restart
233. postrestart
24
25If it does _not_ have a `"restart"` script specified, but it does have
26`stop` and/or `start` scripts, then the following scripts will be run:
27
281. prerestart
292. prestop
303. stop
314. poststop
326. prestart
337. start
348. poststart
359. postrestart
36
37### Configuration
38
39#### `ignore-scripts`
40
41* Default: false
42* Type: Boolean
43
44If true, npm does not run scripts specified in package.json files.
45
46Note that commands explicitly intended to run a particular script, such as
47`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
48will still run their intended script if `ignore-scripts` is set, but they
49will *not* run any pre- or post-scripts.
50
51
52
53#### `script-shell`
54
55* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
56* Type: null or String
57
58The shell to use for scripts run with the `npm exec`, `npm run` and `npm
59init <package-spec>` commands.
60
61
62
63### See Also
64
65* [npm run-script](/commands/npm-run-script)
66* [npm scripts](/using-npm/scripts)
67* [npm test](/commands/npm-test)
68* [npm start](/commands/npm-start)
69* [npm stop](/commands/npm-stop)
70* [npm restart](/commands/npm-restart)
71