You’re probably here because your using either yarn install or npm install and your devDependencies are not installing.

By default, these install actions should install both your devDependencies and dependencies.

The trick here is that both yarn and npm respect the NODE_ENV environment variable, and many times build environments we set the NODE_ENV to production because many build tools (including webpack) produce optimized builds for production use.

Setting NODE_ENV to production silently turns npm install into npm install --production which excludes devDependencies from the install process.

Did you know you can provide a value to the --production flag?

yarn install --production=false

or

npm install --production=false

Either of these will force your install to fetch your devDependencies as well as your normal dependencies.