Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
sst.aws.Function: fix not installing nodejs.install packages
Browse files Browse the repository at this point in the history
  • Loading branch information
thdxr committed Oct 11, 2024
1 parent 7759a4c commit f5ba3bf
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 1 addition & 3 deletions pkg/project/project.go
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,7 @@ func (p *Project) Cleanup() error {
if flag.SST_NO_CLEANUP {
return nil
}
return os.RemoveAll(
filepath.Join(p.PathWorkingDir(), "artifacts"),
)
return nil
}

func (p *Project) PathLog(name string) string {
Expand Down
6 changes: 5 additions & 1 deletion pkg/runtime/node/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,11 @@ func (r *Runtime) Build(ctx context.Context, input *runtime.BuildInput) (*runtim
if slices.Contains(installPackages, "sharp") {
cmd = append(cmd, "--libc=glibc")
}
err = exec.Command("npm", cmd...).Run()
proc := exec.Command("npm", cmd...)
proc.Stdout = os.Stdout
proc.Stderr = os.Stderr
proc.Dir = input.Out()
err = proc.Run()
if err != nil {
return nil, err
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/runtime/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ func (w *Worker) Logs() io.ReadCloser {
}

type NodeProperties struct {
Loader map[string]string `json:"loader"`
Install []string
Banner string
Loader map[string]string `json:"loader"`
Install []string `json:"install"`
Banner string `json:"banner"`
ESBuild esbuild.BuildOptions `json:"esbuild"`
Minify bool `json:"minify"`
Format string `json:"format"`
Expand Down

0 comments on commit f5ba3bf

Please sign in to comment.