Page MenuHomePhabricator

All npm 6 CI jobs are failing on 'npm install'
Closed, ResolvedPublicBUG REPORT

Description

As of this morning, all CI jobs based on node 6 are failing on npm install. This affects both npm-node-6-docker and (presumably) all of the -deploy-npm-node-6-docker jobs.

Example from https://integration.wikimedia.org/ci/job/mobileapps-deploy-npm-node-6-docker/206/console:

12:12:40 npm ERR! Linux 4.9.0-11-amd64
12:12:40 npm ERR! argv "/usr/bin/nodejs" "/usr/local/bin/npm" "install" "nyc@^14.1.1"
12:12:40 npm ERR! node v6.11.0
12:12:40 npm ERR! npm  v3.8.3
12:12:40 npm ERR! code EMISSINGARG
12:12:40 
12:12:40 npm ERR! typeerror Error: Missing required argument #1
12:12:40 npm ERR! typeerror     at andLogAndFinish (/usr/local/lib/node_modules/npm/lib/fetch-package-metadata.js:31:3)
12:12:40 npm ERR! typeerror     at fetchPackageMetadata (/usr/local/lib/node_modules/npm/lib/fetch-package-metadata.js:51:22)
12:12:40 npm ERR! typeerror     at resolveWithNewModule (/usr/local/lib/node_modules/npm/lib/install/deps.js:455:12)
12:12:40 npm ERR! typeerror     at /usr/local/lib/node_modules/npm/lib/install/deps.js:456:7
12:12:40 npm ERR! typeerror     at /usr/local/lib/node_modules/npm/node_modules/iferr/index.js:13:50
12:12:40 npm ERR! typeerror     at /usr/local/lib/node_modules/npm/lib/fetch-package-metadata.js:37:12
12:12:40 npm ERR! typeerror     at addRequestedAndFinish (/usr/local/lib/node_modules/npm/lib/fetch-package-metadata.js:82:5)
12:12:40 npm ERR! typeerror     at returnAndAddMetadata (/usr/local/lib/node_modules/npm/lib/fetch-package-metadata.js:117:7)
12:12:40 npm ERR! typeerror     at pickVersionFromRegistryDocument (/usr/local/lib/node_modules/npm/lib/fetch-package-metadata.js:134:20)
12:12:40 npm ERR! typeerror     at /usr/local/lib/node_modules/npm/node_modules/iferr/index.js:13:50
12:12:40 npm ERR! typeerror This is an error with npm itself. Please report this error at:
12:12:40 npm ERR! typeerror     <http://github.com/npm/npm/issues>

I believe this is happening because the npm version used (v3.8.3) has somehow become insufficient. I was able to reproduce locally by running npm install with v3.8.6. However, npm v.3.10.8 is able to complete the install successfully.

Details

Related Gerrit Patches:
integration/config : masterjjb: Upgrade all node6 jobs to use npm 3.10.10
integration/config : masterdockerfiles: [npm] Upgrade npm to v3.10.10 and cascade
mediawiki/services/mobileapps : master[DNM] Pin all dependencies

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMon, Mar 23, 4:31 PM
Mholloway triaged this task as High priority.Mon, Mar 23, 4:31 PM

This is perplexing. The whole point of docker is locked-down versions so this doesn't happen.

Krinkle added a subscriber: Krinkle.EditedMon, Mar 23, 4:52 PM

I suspect one or both of these is the case, thus causing the issue:

  • Using npm install instead of npm ci (the former ignores the lock file and its pinned deps).
  • Running npm install x@y at run-time instead of specifying it in package.json. (when you install ad-hoc, there is nowhere to pin the deps).

Using npm install instead of npm ci (the former ignores the lock file and its pinned deps).

This is node 6. npm ci doesn't exist yet.

Change 582855 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/services/mobileapps@master] [DNM] Pin nyc

https://gerrit.wikimedia.org/r/582855

Change 582855 abandoned by Jforrester:
[DNM] Pin all dependencies

Reason:
Yeah, this won't work.

https://gerrit.wikimedia.org/r/582855

Change 582860 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[integration/config@master] dockerfiles: [npm] Upgrade npm to v3.10.10 and cascade

https://gerrit.wikimedia.org/r/582860

Change 582863 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[integration/config@master] jjb: Upgrade all node6 jobs to use npm 3.10.10

https://gerrit.wikimedia.org/r/582863

Change 582860 merged by jenkins-bot:
[integration/config@master] dockerfiles: [npm] Upgrade npm to v3.10.10 and cascade

https://gerrit.wikimedia.org/r/582860

Mentioned in SAL (#wikimedia-releng) [2020-03-23T18:43:44Z] <James_F> jjb: Updated npm-node-6-docker for T248326 as an initial test

Change 582863 merged by jenkins-bot:
[integration/config@master] jjb: Upgrade all node6 jobs to use npm 3.10.10

https://gerrit.wikimedia.org/r/582863

OK, this should be fixed for now, but it's very much a kludge. node6 has been "don't use this at all" for a year now. :-(

Jdforrester-WMF closed this task as Resolved.Mon, Mar 23, 6:50 PM
Jdforrester-WMF claimed this task.