Skip to content

Commit c5f0fe9

Browse files
authored
fix: Make npm install faster on appkit (#4407)
## Changes <!-- Brief summary of your changes that is easy to understand --> ## Before ```shell dbs apps init --name appkit8 npm install completed in 29383 ms ``` ## After ```shell dbs apps init --name appkit10 npm install completed in 6671 ms ``` This makes the install ~77% faster It needs this PR on appkit too databricks/appkit#74 ## Why <!-- Why are these changes needed? Provide the context that the reviewer might be missing. For example, were there any decisions behind the change that are not reflected in the code itself? --> ## Tests <!-- How have you tested the changes? --> <!-- If your PR needs to be included in the release notes for next release, add a separate entry in NEXT_CHANGELOG.md as part of your PR. --> Co-authored-by: MarioCadenas <MarioCadenas@users.noreply.github.com>
1 parent f9cac44 commit c5f0fe9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libs/apps/initializer/nodejs.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ func (i *InitializerNodeJs) runNpmInstall(ctx context.Context, workDir string) e
7676
}
7777

7878
return prompt.RunWithSpinnerCtx(ctx, "Installing dependencies...", func() error {
79-
cmd := exec.CommandContext(ctx, "npm", "install")
79+
// Faster npm install command.
80+
cmd := exec.CommandContext(ctx, "npm", "ci", "--no-audit", "--no-fund", "--prefer-offline")
8081
cmd.Dir = workDir
8182
cmd.Stdout = nil
8283
cmd.Stderr = nil

0 commit comments

Comments
 (0)