Fix create-astro pnpm dependencies installation
#13652
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
When running the latest version of
create-astrowith pnpm, I'm getting the following error:After adding some logging, the underlying issue seems to be:
In #13395, the
install()function was updated to usepnpm addinstead ofpnpm installwithout a changeset so it ended up being released 2 days ago with version4.11.2. This PR reverts that change.The
install()function seems to only be meant to install all dependencies (and never a single package) so I'm not sure if there is a reason I'm potentially missing for the change or not.Testing
I tested locally using
node create-astro.mjsbut I don't know how to force a specific package manager with this method so I temporarily hardcodedpnpm. Without the fix, I properly reproduced the error. After the fix, the issue seems to be resolved.Looks like most of the tests for
create-astroare usingdryRun: trueso not sure if/how we should add a test for this.Docs
This is a bug fix that does not require any documentation change.