1NPM-START(1) NPM-START(1)
2
3
4
6 npm-start - Start a package
7
8 Synopsis
9 npm start [-- <args>]
10
11 Description
12 This runs a predefined command specified in the "start" property of a
13 package's "scripts" object.
14
15 If the "scripts" object does not define a "start" property, npm will
16 run node server.js.
17
18 Note that this is different from the default node behavior of running
19 the file specified in a package's "main" attribute when evoking with
20 node .
21
22 As of npm@2.0.0 https://blog.npmjs.org/post/98131109725/npm-2-0-0, you
23 can use custom arguments when executing scripts. Refer to npm help
24 run-script for more details.
25
26 Example
27 {
28 "scripts": {
29 "start": "node foo.js"
30 }
31 }
32
33 npm start
34
35 > npm@x.x.x start
36 > node foo.js
37
38 (foo.js output would be here)
39
40
41 Configuration
42 <!-- AUTOGENERATED CONFIG DESCRIPTIONS START --> <!-- automatically
43 generated, do not edit manually --> <!-- see lib/utils/config/defini‐
44 tions.js -->
45
46 ignore-scripts
47 • Default: false
48
49 • Type: Boolean
50
51
52 If true, npm does not run scripts specified in package.json files.
53
54 Note that commands explicitly intended to run a particular script, such
55 as npm start, npm stop, npm restart, npm test, and npm run-script will
56 still run their intended script if ignore-scripts is set, but they will
57 not run any pre- or post-scripts. <!-- automatically generated, do not
58 edit manually --> <!-- see lib/utils/config/definitions.js -->
59
60
61 script-shell
62 • Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
63
64 • Type: null or String
65
66
67 The shell to use for scripts run with the npm exec, npm run and npm
68 init <pkg> commands. <!-- automatically generated, do not edit manu‐
69 ally --> <!-- see lib/utils/config/definitions.js -->
70
71 <!-- AUTOGENERATED CONFIG DESCRIPTIONS END -->
72
73
74 See Also
75 • npm help run-script
76
77 • npm help scripts
78
79 • npm help test
80
81 • npm help restart
82
83 • npm help stop
84
85
86
87
88 October 2021 NPM-START(1)