Include (or omit) Node.js devDependencies in your CI environment

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 opt…

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 ?


Print Share Comment Cite Upload Translate
APA
Dana Woodman | Sciencx (2024-03-29T02:22:56+00:00) » Include (or omit) Node.js devDependencies in your CI environment. Retrieved from https://www.scien.cx/2021/04/06/include-or-omit-node-js-devdependencies-in-your-ci-environment/.
MLA
" » Include (or omit) Node.js devDependencies in your CI environment." Dana Woodman | Sciencx - Tuesday April 6, 2021, https://www.scien.cx/2021/04/06/include-or-omit-node-js-devdependencies-in-your-ci-environment/
HARVARD
Dana Woodman | Sciencx Tuesday April 6, 2021 » Include (or omit) Node.js devDependencies in your CI environment., viewed 2024-03-29T02:22:56+00:00,<https://www.scien.cx/2021/04/06/include-or-omit-node-js-devdependencies-in-your-ci-environment/>
VANCOUVER
Dana Woodman | Sciencx - » Include (or omit) Node.js devDependencies in your CI environment. [Internet]. [Accessed 2024-03-29T02:22:56+00:00]. Available from: https://www.scien.cx/2021/04/06/include-or-omit-node-js-devdependencies-in-your-ci-environment/
CHICAGO
" » Include (or omit) Node.js devDependencies in your CI environment." Dana Woodman | Sciencx - Accessed 2024-03-29T02:22:56+00:00. https://www.scien.cx/2021/04/06/include-or-omit-node-js-devdependencies-in-your-ci-environment/
IEEE
" » Include (or omit) Node.js devDependencies in your CI environment." Dana Woodman | Sciencx [Online]. Available: https://www.scien.cx/2021/04/06/include-or-omit-node-js-devdependencies-in-your-ci-environment/. [Accessed: 2024-03-29T02:22:56+00:00]
rf:citation
» Include (or omit) Node.js devDependencies in your CI environment | Dana Woodman | Sciencx | https://www.scien.cx/2021/04/06/include-or-omit-node-js-devdependencies-in-your-ci-environment/ | 2024-03-29T02:22:56+00:00
https://github.com/addpipe/simple-recorderjs-demo