From 0cd5075466ac77565f41074c28b05b0ad1459d86 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Fri, 8 Dec 2017 17:20:51 -0600 Subject: [PATCH] Pin to npm4 until npm 5.6.0 comes out npm5 has an issue uploading tarballs it didn't build. For now, install npm4 and use that to upload our tarballs. The fix for https://github.com/npm/npm/issues/16723 should be in 5.6.0 which should allow us to revert this. Change-Id: I8f633ee2119218799706b47ba3b471dcb04c1253 --- roles/upload-npm/tasks/main.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/upload-npm/tasks/main.yaml b/roles/upload-npm/tasks/main.yaml index 8fa53f2d4..133a769ba 100644 --- a/roles/upload-npm/tasks/main.yaml +++ b/roles/upload-npm/tasks/main.yaml @@ -20,4 +20,6 @@ [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm nvm install node nvm use node - npm publish --ignore-scripts {{ zuul.executor.work_root }}/artifacts/{{ zuul.project.short_name }}-{{ project_ver }}.tar.gz + # Workaround for https://github.com/npm/npm/issues/16723 + npm install npm@4 + node_modules/.bin/npm publish --ignore-scripts {{ zuul.executor.work_root }}/artifacts/{{ zuul.project.short_name }}-{{ project_ver }}.tar.gz