Skip to content
Docs Try Aspire
Docs Try

withNpm

Method
📦 Aspire.Hosting.JavaScript v13.4.0
interface BunAppResource {
// ... omitted for brevity
withNpm(
install?: boolean,
installCommand?: string,
installArgs?: string[]): JavaScriptAppResource;
}

Signature

method withNpm builder
Configures the Node.js resource to use npm as the package manager and optionally installs packages before the application starts.
withNpm(
install?: boolean,
installCommand?: string,
installArgs?: string[]): JavaScriptAppResource
install boolean optional = True
installCommand string optional
installArgs string[] optional
JavaScriptAppResource

Applies to

This method applies to the following types: