Home

developmentDependencies

DevelopmentDependencies, or devDependencies, is a field in a package.json file used by Node.js package managers to designate packages that are only required during development, testing, or build time. These can include test frameworks, linters, transpilers, bundlers, and other tooling. They are separate from dependencies, which are needed at runtime by consuming applications.

In a typical project, devDependencies list tools such as jest or mocha for testing, eslint for linting,

Installing dependencies for development usually includes both dependencies and devDependencies, via commands like npm install. To

DevDependencies are recorded in lockfiles (e.g., package-lock.json) to ensure reproducible installs. In monorepos or workspaces, devDependencies

typescript
or
babel
for
compilation,
and
webpack
or
rollup
for
bundling.
These
items
facilitate
development
and
quality
assurance
but
are
not
required
for
the
package
to
run
in
a
production
environment.
When
a
package
is
published,
its
devDependencies
are
not
installed
for
consumers
that
install
the
package
as
a
dependency,
helping
keep
production
installations
lean.
install
only
production
dependencies,
commands
such
as
npm
install
--production
or
npm
ci
--omit=dev
(depending
on
the
version)
are
commonly
used.
This
behavior
can
be
influenced
by
environment
variables
like
NODE_ENV.
can
be
scoped
to
individual
packages.
While
the
concept
is
most
associated
with
npm,
it
is
a
standard
part
of
other
JavaScript
package
managers
as
well,
with
variations
in
commands
and
configuration.