1

I'm trying to install the artillery NPM package using npm in a docker container with npm install -g artillery. However it hangs with this message

[..................] / rollbackFailedOptional: verb npm-session 005fda8725330544

Initially I tried using the debian:stretch docker image, installing nodejs and npm with apt. I've also tried the offical node docker image and the alpine image (with apk add nodejs npm. All of them have this same error.

I have working network in the containers and I can see the NPM registry fine in all the different docker containers

# curl http://registry.npmjs.org/
{"db_name":"registry","doc_count":1114477,"doc_del_count":341,"update_seq":16317727,"purge_seq":0,"compact_running":false,"disk_size":13471206003,"data_size":11114653800,"instance_start_time":"1547073780489012","disk_format_version":6,"committed_update_seq":16317727}

Most people with this error have proxy issues, but I don't have any proxies set, nor have tried to set any I've left the config at default:

# npm config list
; cli configs
metrics-registry = "https://registry.npmjs.org/"
scope = ""
user-agent = "npm/6.4.1 node/v8.15.0 linux x64"

; node bin location = /usr/bin/node
; cwd = /
; HOME = /root
; "npm config ls -l" to show all defaults.

The most bizarre thing is if I instead create an Ubuntu VM (not container), install node and npm with apt, node works just fine! It seems like it's a docker problem.

Jamie Scott
  • 452
  • 4
  • 20
  • Have you tried the solutions provided in this question : https://stackoverflow.com/questions/46011546/npm-install-error-rollbackfailedoptional ? – Seblor Jan 11 '19 at 11:04
  • Yep, I've already found that and tried all the suggestions. Hence I think it's a docker problem as all works as expected in a VM. – Jamie Scott Jan 11 '19 at 11:09
  • And it's not just the artillery package either, `npm install -g npm` also hangs on the same error. – Jamie Scott Jan 11 '19 at 11:10

0 Answers0