What are your opinions comparing this method npm install --only=prod with npm ci?
npm install --only=prod
npm ci
I found that npm ci --only=prod works as well (see link)
npm ci --only=prod
You're correct. npm ci also installs dev dependencies.
Adding --only=prod or --production would not install devDependencies and just install dependencies.
--only=prod
--production
devDependencies
dependencies
I'll update the article to show both options 👍
It's now recommended to use --omit=dev over --production 😆 Good ole Node.js.
--omit=dev
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
What are your opinions comparing this method
npm install --only=prod
withnpm ci
?I found that
npm ci --only=prod
works as well (see link)You're correct.
npm ci
also installs dev dependencies.Adding
--only=prod
or--production
would not installdevDependencies
and just installdependencies
.I'll update the article to show both options 👍
It's now recommended to use
--omit=dev
over--production
😆 Good ole Node.js.