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

fix(install): don't re-set up node_modules if running lifecycle script #26984

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nathanwhit
Copy link
Member

@nathanwhit nathanwhit commented Nov 21, 2024

Fixes #26904

If using nodeModulesDir: "auto", it's possible for the lifecycle script subprocess to try to set up the node_modules dir (despite the fact that we're already doing that). If it does that, it hangs trying to acquire the file lock on the node_modules dir.

As a fix, don't try to set up node_modules if we're running as part of a lifecycle script.

Ideally we'd have better control over when we do and don't set up node_modules automatically (that's the underlying problem behind #25782 as well)

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Is there a way we can get lifecycle scripts to show their output so that we could test this?

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.

deno install --allow-scripts indefinitely stuck on - [email protected]: running 'postinstall' script
2 participants