Dana Woodman
Posted on April 6, 2021
UPDATE: It's actually simpler to use npm ci
instead of npm install
because it installs devDependencies
too and is actually more efficient. Hat tip to Lucian 🍻
Ever need to install your devDependencies
in a CI environment but the environment wants to install only dependencies
? Here's how to fix it:
npm install --include=dev
You can also omit dependencies with the --omit=...
flag.
You can use the options dev
, optional
and peer
in both these flags.
Hope that saves you a few minutes, as it did me! 🍻
Hat tip to Ben McCann on the Svelte Discord for pointing me in the right direction!
Follow me on Dev.to, Twitter and Github for more web dev and startup related content 🤓
💖 💪 🙅 🚩
Dana Woodman
Posted on April 6, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.