Page URL
https://github.com/CommunityToolkit/Aspire/tree/main/src/CommunityToolkit.Aspire.Hosting.NodeJS.Extensions#package-installation-with-custom-flags
Describe the issue
In a PR about 2 month ago the way you pass additional arguments for installation (in my case npm, but it seems the same for yarn and pnpm) got changed from an array to an callback instead. The linked documentation is outdated.
Merged PR
Suggestion
Update the documentation and show examples using callbacks.
Here´s one example:
Old:
builder.AddNpmApp("npm-app", "./path/to/app")
.WithNpmPackageInstallation(useCI: false, args: ["--legacy-peer-deps"])
.WithExternalHttpEndpoints();
New:
builder.AddNpmApp("npm-app", "./path/to/app")
.WithNpmPackageInstallation(useCI: false, configureInstaller =>
{
configureInstaller.WithArgs("--legacy-peer-deps");
})
.WithExternalHttpEndpoints();
Additional context
No response
Help us help you
No, just wanted to report this