diff --git a/jenkins/jobs/macros.yaml b/jenkins/jobs/macros.yaml index 27e925fcd3..21a5eac9a9 100644 --- a/jenkins/jobs/macros.yaml +++ b/jenkins/jobs/macros.yaml @@ -269,9 +269,11 @@ npm run {command} --silent fi - # Execute shrinkwrap, and output the dependencies that were used. - npm prune # https://github.com/npm/npm/issues/6298 - npm shrinkwrap + # If no shrinkwrap exists, generate it. + if [ ! -f ./npm-shrinkwrap.json ]; then + npm prune # https://github.com/npm/npm/issues/6298 + npm shrinkwrap + fi - builder: name: xvfb-start