How to specify the path in the package.json?

Good day!

Noticed that many indicate an absolute path in the package.json.

For example:
"scripts": {
 "start": "./node_modules/.bin/webpack-dashboard"

Instead of a simple
"scripts": {
 "start": "webpack-dashboard"

For what? It's something to do with the file system?
July 2nd 19 at 16:55
1 answer
July 2nd 19 at 16:57
In the first case, if webpack-dashboard is installed locally to the project, the npm will start specific webpack-dashboard even if there is global in the system.

Second, if webpack-dashboard is installed globally for all projects.
: Short: Yes. Deployed: when you call just "webpack-dashboard", the system searches for this bat or .sh to the PATH where npm recorded the path to the global node_module/.bin where all these .bat .sh is stored if the module is installed globally and you can run it in the console. - abigail36 commented on July 2nd 19 at 17:00
Got it, thanks! - rosetta81 commented on July 2nd 19 at 17:03

Find more questions by tags Node.jsJavaScript