11cb0ef41Sopenharmony_ci---
21cb0ef41Sopenharmony_cititle: npm-start
31cb0ef41Sopenharmony_cisection: 1
41cb0ef41Sopenharmony_cidescription: Start a package
51cb0ef41Sopenharmony_ci---
61cb0ef41Sopenharmony_ci
71cb0ef41Sopenharmony_ci### Synopsis
81cb0ef41Sopenharmony_ci
91cb0ef41Sopenharmony_ci```bash
101cb0ef41Sopenharmony_cinpm start [-- <args>]
111cb0ef41Sopenharmony_ci```
121cb0ef41Sopenharmony_ci
131cb0ef41Sopenharmony_ci### Description
141cb0ef41Sopenharmony_ci
151cb0ef41Sopenharmony_ciThis runs a predefined command specified in the `"start"` property of
161cb0ef41Sopenharmony_cia package's `"scripts"` object.
171cb0ef41Sopenharmony_ci
181cb0ef41Sopenharmony_ciIf the `"scripts"` object does not define a  `"start"` property, npm
191cb0ef41Sopenharmony_ciwill run `node server.js`.
201cb0ef41Sopenharmony_ci
211cb0ef41Sopenharmony_ciNote that this is different from the default node behavior of running
221cb0ef41Sopenharmony_cithe file specified in a package's `"main"` attribute when evoking with
231cb0ef41Sopenharmony_ci`node .`
241cb0ef41Sopenharmony_ci
251cb0ef41Sopenharmony_ciAs of [`npm@2.0.0`](https://blog.npmjs.org/post/98131109725/npm-2-0-0), you can
261cb0ef41Sopenharmony_ciuse custom arguments when executing scripts. Refer to [`npm run-script`](/commands/npm-run-script) for more details.
271cb0ef41Sopenharmony_ci
281cb0ef41Sopenharmony_ci### Example
291cb0ef41Sopenharmony_ci
301cb0ef41Sopenharmony_ci```json
311cb0ef41Sopenharmony_ci{
321cb0ef41Sopenharmony_ci  "scripts": {
331cb0ef41Sopenharmony_ci    "start": "node foo.js"
341cb0ef41Sopenharmony_ci  }
351cb0ef41Sopenharmony_ci}
361cb0ef41Sopenharmony_ci```
371cb0ef41Sopenharmony_ci
381cb0ef41Sopenharmony_ci```bash
391cb0ef41Sopenharmony_cinpm start
401cb0ef41Sopenharmony_ci
411cb0ef41Sopenharmony_ci> npm@x.x.x start
421cb0ef41Sopenharmony_ci> node foo.js
431cb0ef41Sopenharmony_ci
441cb0ef41Sopenharmony_ci(foo.js output would be here)
451cb0ef41Sopenharmony_ci
461cb0ef41Sopenharmony_ci```
471cb0ef41Sopenharmony_ci
481cb0ef41Sopenharmony_ci### Configuration
491cb0ef41Sopenharmony_ci
501cb0ef41Sopenharmony_ci#### `ignore-scripts`
511cb0ef41Sopenharmony_ci
521cb0ef41Sopenharmony_ci* Default: false
531cb0ef41Sopenharmony_ci* Type: Boolean
541cb0ef41Sopenharmony_ci
551cb0ef41Sopenharmony_ciIf true, npm does not run scripts specified in package.json files.
561cb0ef41Sopenharmony_ci
571cb0ef41Sopenharmony_ciNote that commands explicitly intended to run a particular script, such as
581cb0ef41Sopenharmony_ci`npm start`, `npm stop`, `npm restart`, `npm test`, and `npm run-script`
591cb0ef41Sopenharmony_ciwill still run their intended script if `ignore-scripts` is set, but they
601cb0ef41Sopenharmony_ciwill *not* run any pre- or post-scripts.
611cb0ef41Sopenharmony_ci
621cb0ef41Sopenharmony_ci
631cb0ef41Sopenharmony_ci
641cb0ef41Sopenharmony_ci#### `script-shell`
651cb0ef41Sopenharmony_ci
661cb0ef41Sopenharmony_ci* Default: '/bin/sh' on POSIX systems, 'cmd.exe' on Windows
671cb0ef41Sopenharmony_ci* Type: null or String
681cb0ef41Sopenharmony_ci
691cb0ef41Sopenharmony_ciThe shell to use for scripts run with the `npm exec`, `npm run` and `npm
701cb0ef41Sopenharmony_ciinit <package-spec>` commands.
711cb0ef41Sopenharmony_ci
721cb0ef41Sopenharmony_ci
731cb0ef41Sopenharmony_ci
741cb0ef41Sopenharmony_ci### See Also
751cb0ef41Sopenharmony_ci
761cb0ef41Sopenharmony_ci* [npm run-script](/commands/npm-run-script)
771cb0ef41Sopenharmony_ci* [npm scripts](/using-npm/scripts)
781cb0ef41Sopenharmony_ci* [npm test](/commands/npm-test)
791cb0ef41Sopenharmony_ci* [npm restart](/commands/npm-restart)
801cb0ef41Sopenharmony_ci* [npm stop](/commands/npm-stop)
81