For a new module I'm trying to use
"build": "node build.js"
"build": "touch TESTFILE"
The issue is that
npm build is actually already an internal command, as described in the docs:
This is the plumbing command called by npm link and npm install. It should generally not be called directly.
Because that command already exists, it always shadows over your
"build": "node build.js".
The fully-qualified way to run your own script is with
run-script or its alias
$ npm run build
npm start and others are short-hand for the fully-qualified
run-script, but is only an option when an existing npm command doesn't shadow it, like
npm build does. Basically, if an built-in npm command isn't found it will try to find and use any matching one from your
"scripts" package.json property.