This is the weirdest thing. We have two identical boxes, mcr-base and mcr-full. Both use [[https://wikitech.wikimedia.org/wiki/Help:MediaWiki-Vagrant_in_Cloud_VPS|labs-vagrant]], one as a default setup, the other one with a bunch of roles enabled. I followed the steps at [[https://www.mediawiki.org/wiki/Selenium/Node.js/Inside_MediaWiki-Vagrant|Selenium/Node.js/Inside_MediaWiki-Vagrant]] to set up browser tests (which basically consist of `npm install`). In mcr-base it works, in mcr-full the dependencies of the `webdriver` package are not installed.
The two machines use the same base image with the same amount of resources, same OS version, same node version, same vagrant version. The MediaWiki checkout has the same `package.json` file in both. `npm config ls -l` gives the same result. And yet, in mcr-full, npm install consistently fails (without giving any error message) - `npm run selenium` complains about the `wdio` binary missing. `npm rebuild` fixes that but does not install any dependencies of the webdriver module. (I have tried some terrible hack along the lines of `MODULE=foo; while [[ -n $MODULE ]]; do npm install $MODULE; MODULE=$(npm run selenium |& tee /dev/tty | grep 'Error: Cannot find module' | sed "s/^Error: Cannot find module '//" | sed "s/'$//"); done` which installs several modules but at some point it starts complaining about `../core-js/is-iterable` module missing and I have no idea what that is or how it could be installed.