Replies: 1 comment 3 replies
-
When I try npm v1 through v6 in a package without a "build" script, it does exit zero with no output - when I try npm 7, it errors with "unknown command". When I do the same in a package with a "build" script in npm < 7, i get In other words, I don't think it's ever been a useful alias for |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
From what I gather, npm build changed somewhere along the way, such that npm build used to be a functional counterpart to npm start; whereas now npm build has been subsumed as some sort of internal command. But the documentation for npm 6.x and 7.x makes no mention of this, and primarily references npm link or npm install. The docs and the npm build command itself do mention npm run-script. So it is very confusing, and one must understand very well that npm start is a shortcut for nmp run-script start, and npm start is related therefore to npm run-script build and npm build 's apparent old usage.
So it would be excellent to update the docs to lay this out as an aside, and help refer someone who isn't absolutely immersed in npm culture to the right places. In particular, this would be helpful because shortcut commands like npm start, npm test, etc still exist and are readily referenced by project's like build-react-app. i.e. It is not immediately apparent that the npm build cognate does not apply (or rather, given all the web references to it, npm build used to apply but does not apply any longer -- if expecting to see a description or usage similar to npm start, etc please see npm run-script build).
Beta Was this translation helpful? Give feedback.
All reactions