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