Skip to content
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

Use --force when installing deps for git prepare scripts #63

Merged
merged 1 commit into from
Feb 1, 2021

Conversation

isaacs
Copy link
Contributor

@isaacs isaacs commented Jan 29, 2021

If a git dependency has conflicting peerDependencies, dependencies with
engines fields that don't match the current environment, and so on, it
isn't much help to crash the installation for these issues. The user
installing the git dependency is likely not in a position to fix them,
but from npm and Arborist's points of view, it is the 'main' project
that has a problem (since the install is being run as a separate
process).

This commit passes '--force' to the npm child process that installs
dependencies for git packages before running their 'prepare' script, to
ignore all such issues (or reduce them to warnings).

Related to: npm/cli#2548

References

If a git dependency has conflicting peerDependencies, dependencies with
engines fields that don't match the current environment, and so on, it
isn't much help to crash the installation for these issues.  The user
installing the git dependency is likely not in a position to fix them,
but from npm and Arborist's points of view, it is the 'main' project
that has a problem (since the install is being run as a separate
process).

This commit passes '--force' to the npm child process that installs
dependencies for git packages before running their 'prepare' script, to
ignore all such issues (or reduce them to warnings).

Related to: npm/cli#2548

PR-URL: #63
Credit: @isaacs
Close: #63
Reviewed-by: @nlf
@isaacs isaacs force-pushed the isaacs/force-install-for-git-dep-preparation branch from 505becb to 0d0d76c Compare February 1, 2021 19:02
@isaacs isaacs closed this in 0d0d76c Feb 1, 2021
@isaacs isaacs merged commit 0d0d76c into latest Feb 1, 2021
@lukekarrys lukekarrys deleted the isaacs/force-install-for-git-dep-preparation branch July 2, 2021 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants