'Why does "npm start" work without "run", but no other script does? [duplicate]
In my package.json file, there is the "scripts" section with my "start" script. When I type npm start it runs the "start" script. But for any other script, you have to run it by doing npm run [script-name].
This makes me have 2 questions:
- Why does the "start" script work without doing
npm run start, but no other scripts work without "run"? - Is there any way to make other scripts run without doing
npm run [script-name]?- With NPM, the answer is no.
But if you look at the comment, it is said that you can useyarnto do this.
- With NPM, the answer is no.
Solution 1:[1]
That's by convention. No, you cannot run other scripts without run.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | user835611 |
