-
-
Notifications
You must be signed in to change notification settings - Fork 767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not install developer dependencies for NodeJS #2483
Comments
this was the command recommended by the npm developers a common example is when a tool uses typescript |
Ah, because we're installing directly from Is there any interest in making that configurable as part of the install? |
no it shouldn't be configurable -- though deleting |
Hmm, it's installing optional dependencies which are the big ones. Seems NPM 6 uses Any interest in adding |
this is the actual relevant install command: pre-commit/pre_commit/languages/node.py Line 116 in e1ce4c0
the command you're referring to is so pack can succeed and is the one that the npm developers recommended to us |
Oh, I see. OK, I'll need to debug what is going on then. I'm pretty sure we can work around this with |
I'm pretty sure all you need to do is submit a patch to delete |
but you'll need to do some research to make sure that's safe as well |
search 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
thenadditional_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 thepre-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
The text was updated successfully, but these errors were encountered: