Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
eyalbe4 committed Nov 10, 2024
2 parents 7d9e139 + a1df9c7 commit c9ac83b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build/utils/npm.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,11 @@ func CalculateDependenciesMap(executablePath, srcPath, moduleId string, npmListP
return nil, err
}
var data []byte
// If we don't have node_modules, the function will use the package-lock dependencies.
if nodeModulesExist && !npmListParams.IgnoreNodeModules {
// When `skipInstall` is true, we aim to rely on the dependencies specified in the package-lock, so Frogbot will not execute 'npm ls' on modules that are unbuilt and lack lock files (which may still have incomplete node_modules that could cause errors).
if nodeModulesExist && !npmListParams.IgnoreNodeModules && !skipInstall {
data = runNpmLsWithNodeModules(executablePath, srcPath, npmListParams.Args, log)
} else {
// If we don't have node_modules, the function will use the package-lock dependencies.
data, err = runNpmLsWithoutNodeModules(executablePath, srcPath, npmListParams, log, npmVersion, skipInstall)
if err != nil {
return nil, err
Expand Down

0 comments on commit c9ac83b

Please sign in to comment.