Skip to content
DocsTry Aspire
DocsTry

JavaScriptAppResource.withNpm

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

Signature

methodwithNpmbuilder
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
installbooleanoptional= True
installCommandstringoptional
installArgsstring[]optional
JavaScriptAppResource

Defined on

This method is defined on the following type: