What does "dev" true
means in package-lock.json
file?
In my case it is automatically updated when I perform npm
operations.
How can we remove it?
So answering your first question, "dev": true
in package-lock.json
means this dependency won't be installed by npm install
/npm ci
when running in production
mode.
Having dependencies used only for local development environment marked with "dev": true
and then using --production
in your CI might save you some build time.
From documentation https://docs.npmjs.com/cli/install#description:
By default,
npm install
will install all modules listed as dependencies inpackage.json
.With the
--production
flag (or when theNODE_ENV
environment variable is set toproduction
), npm will not install modules listed indevDependencies
.