npm start
and npm run
are both npm commands, the differences between them are as follows:
npm start
is one of npm's built-in commands for starting projects. It looks for a file in the root of the projectpackage.json
, and in that file it looks for the commandsscripts
in the fieldsstart
. If the command is found, it will be executed to start the project, otherwise an error will be reported.npm run
Also a command for npm to runpackage.json
custom scripts in files. Its syntax isnpm run script_name
wherescript_name
ispackage.json
the name of the script defined in the file. Unlikenpm start
, other custom scriptsnpm run
can be run exceptstart
, and the script name must be specified explicitly. In short,npm start
it is a special, built-in command used to start the project; andnpm run
it is a general command used to run custom scripts.