diff --git a/cmd/helpers.go b/cmd/helpers.go index b251333f..4d188e97 100644 --- a/cmd/helpers.go +++ b/cmd/helpers.go @@ -219,6 +219,15 @@ func InstallFrontendDeps(projectDir string, projectOptions *ProjectOptions, forc const md5sumFile = "package.json.md5" + // If node_modules does not exist, force a rebuild. + nodeModulesPath, err := filepath.Abs(filepath.Join(".", "node_modules")) + if err != nil { + return err + } + if !fs.DirExists(nodeModulesPath) { + forceRebuild = true + } + // If we aren't forcing the install and the md5sum file exists if !forceRebuild && fs.FileExists(md5sumFile) { // Yes - read contents