Node.js / npm

Node.js / npm: npm run <script> — Windows

Run a script declared in package.json.

Availability: Third-party software; install and version dependent.中文

Syntax

npm run <script>

Examples

Run a script declared in package.json.

npm run <script>

Parameters, options and clauses

Option / clauseDescription
<script>Run the named script from package.json.
--if-presentDo not fail if the requested script is absent.
--workspace <name>Run the script in a selected workspace.
--workspacesRun the script in configured workspaces.
-- <args>Pass subsequent arguments to the script.
Safety note

Review a command and its target before running it. Commands that alter files, services, accounts, disks, permissions or databases may be difficult to reverse. Test in a safe environment and keep backups.

Official reference ↗Back to directory