Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

optionalDependencies is really wonky #2737

Closed
substack opened this Issue · 1 comment

2 participants

@substack

I've been running into problems where an optionalDependencies entry is specified but npm treats it exactly like a regular dependency, which causes the whole install to fail instead of ignoring the optional package. This feature seems really weird. npm should just ignore optionalDependencies outright and if people want extra magic they can fiddle with the packages themselves.

@isaacs
Owner

The "try-and-continue-on-failure" behavior seems to be not surprising to most people. I think you had an old version that only continued on certain types of failures, but not others, which was the problem you ran into.

An opt-out would be nice.

@isaacs isaacs closed this issue from a commit
@isaacs isaacs Fix #2737 Add --no-optional to opt out of optionalDependencies
Or 'npm config set optional false' to make them never be used ever.
3bf7d2f
@isaacs isaacs closed this in 3bf7d2f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.