Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(core): ensure preinstall is only run once on repo #18671

Merged
merged 2 commits into from
Aug 18, 2023

Conversation

meeroslav
Copy link
Contributor

Current Behavior

The preinstall step runs every time we call installPackagesTask (on every generator and migration that added packages)

Expected Behavior

The preinstall step should only run once, during the CNW to ensure install is run with the proper pm version.

Related Issue(s)

Fixes #

@meeroslav meeroslav requested a review from a team as a code owner August 17, 2023 09:05
@meeroslav meeroslav self-assigned this Aug 17, 2023
@meeroslav meeroslav requested a review from AgentEnder August 17, 2023 09:05
@vercel
Copy link

vercel bot commented Aug 17, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 18, 2023 2:56pm

@meeroslav meeroslav added the scope: core core nx functionality label Aug 17, 2023
@@ -42,7 +43,9 @@ export function installPackagesTask(
cwd: join(tree.root, cwd),
stdio: process.env.NX_GENERATE_QUIET === 'true' ? 'ignore' : 'inherit',
};
if (pmc.preInstall) {
// only run preinstall if install hasn't been run yet
// this only happens during CNW when preset is adding its dependencies
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can move this step out of devkit and into the new generator.

@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 24, 2023
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
scope: core core nx functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants