Its said that npm start and npm run start are same, then in my case npm run watch is working fine but npm watch is not working,
Following is the error when i run npm watch is:
Usage: npm <command>
where <command> is one of:
access, adduser, audit, bin, bugs, c, cache, ci, cit,
clean-install, clean-install-test, completion, config,
create, ddp, dedupe, deprecate, dist-tag, docs, doctor,
edit, explore, fund, get, help, help-search, hook, i, init,
install, install-ci-test, install-test, it, link, list, ln,
login, logout, ls, org, outdated, owner, pack, ping, prefix,
profile, prune, publish, rb, rebuild, repo, restart, root,
run, run-script, s, se, search, set, shrinkwrap, star,
stars, start, stop, t, team, test, token, tst, un,
uninstall, unpublish, unstar, up, update, v, version, view,
whoami
npm <command> -h quick help on <command>
npm -l display full usage info
npm help <term> search for help on <term>
npm help npm involved overview
Specify configs in the ini-formatted file:
C:\Users\erdiv\.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config
[email protected] C:\Program Files\nodejs\node_modules\npm
my package.json is:
{
"name": "web",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
"start": "nodemon server.js",
"watch": "npx watchify ./public/main.js -o ./public/bundle.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"budo": "^11.6.3",
"express": "^4.17.1",
"nodemon": "^2.0.3",
"socket.io": "^2.3.0",
"watchify": "^3.11.1"
}
}
Please help in clarification, that why can't i use command "npm watch" in this case.