Welcome to the Treehouse Community
Looking to learn something new?
PoJung Chen5,856 Points
why use "npm start" but not "npm run start"?
In the last video, we use "npm run build" to execute the script. Why we only use "npm start" and npm can still run it?
Take a look at the "scripts" field.
The "scripts" property is a dictionary containing script commands that are run at various times in the lifecycle of your package. The key is the lifecycle event, and the value is the command to run at that point.
See npm-scripts to find out more about writing package scripts.
npm supports the "scripts" property of the package.json script, for the following scripts:
prestart, start, poststart: Run by the npm start command.
You don't have a build task in your scripts field.