Do not install developer dependencies for NodeJS
See original GitHub issuesearch tried in the issue tracker
dev node
describe your issue
The NodeJS language install command uses --dev
(which should be --include=dev
, #1983) to install packages. This is unneeded.
Packages only require the production (dependencies
) installed. Any package that is requiring the developer dependencies to be installed to operate is broken.
If a package is using peerDependencies
then additional_dependencies
should be used to install them.
This is an issue when installing NPM modules when the developer dependencies are of significant size. The pre-commit
users have to sit through a lengthy download session when warming up the pre-commit cache
. The downloaded dependencies are unused once installed.
pre-commit --version
pre-commit 2.17.0
.pre-commit-config.yaml
# any config that installs NPM modules
~/.cache/pre-commit/pre-commit.log (if present)
No response
Issue Analytics
- State:
- Created a year ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
How do you prevent install of "devDependencies" NPM ...
The npm install command will install the devDependencies along other dependencies when run inside a package directory, in a development environment (the ...
Read more >Adding dependencies to a package.json file - npm Docs
To add dependencies and devDependencies to a package.json file from the command line, you can install them in the root directory of your...
Read more >Installing Dev Dependencies with npm: Beginners' Guide
NPM installs devDependencies within the package.json file. The 'npm install' command should add all the dependencies and devDependencies ...
Read more >Error npm install won t install devDependencies - Edureka
For some reason when I run npm install it won't install devDependencies. If I run npm install --dev devDependencies are installed.
Read more >Include (or omit) Node.js devDependencies in your CI ...
Adding --only=prod or --production would not install devDependencies and just install dependencies . I'll update the article to show both ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
no it shouldn’t be configurable – though deleting
./node_modules
after install should be safe if you’d want to pursue that insteadbut you’ll need to do some research to make sure that’s safe as well