Page MenuHomePhabricator

npm ERR! enoent Invalid response body while trying to fetch https://registry.npmjs.org/ua-parser-js: ENOENT: no such file or directory
Closed, ResolvedPublic

Description

For patch 730546 several jobs run, including:

In the failing job, this is the error message:

...
npm ERR! path /cache/npm/_cacache/content-v2/sha512/1a/ca/f51e819985c3e66447d881017cea22d7884257433f867cdb5d7d614f451cd2590aa0bbe78ffdd91dd034562a4d549cbb5f0c3aba51b900fe5caf4ff90ff6
npm ERR! errno ENOENT
npm ERR! enoent Invalid response body while trying to fetch https://registry.npmjs.org/ua-parser-js: ENOENT: no such file or directory, lstat '/cache/npm/_cacache/content-v2/sha512/1a/ca/f51e819985c3e66447d881017cea22d7884257433f867cdb5d7d614f451cd2590aa0bbe78ffdd91dd034562a4d549cbb5f0c3aba51b900fe5caf4ff90ff6'
...
subprocess.CalledProcessError: Command '['npm', 'ci']' returned non-zero exit status 1.
...

I'm not sure why the job fails.

npm ci runs fine in Fresh: P18241.

Event Timeline

Looks like the problem was in package-lock.json version 1 and 2 confusion.

hashar changed the task status from Invalid to Resolved.Dec 17 2021, 7:27 PM
hashar added a subscriber: hashar.

It was most probably a cache corruption issue. The best choice usually is to delete the cache entirely. From the console output:

00:00:05.310 Defined: CASTOR_NAMESPACE="mediawiki-core/master/wmf-quibble-selenium-php72-docker"

Then I did:

ssh integration-castor03.integration.eqiad1.wikimedia.cloud sudo rm -fR /srv/jenkins-workspace/caches/mediawiki-core/master/wmf-quibble-selenium-php72-docker

Mentioned in SAL (#wikimedia-releng) [2021-12-17T19:27:45Z] <hashar> deleting corrupted castor cache ssh integration-castor03.integration.eqiad1.wikimedia.cloud sudo rm -fR /srv/jenkins-workspace/caches/mediawiki-core/master/wmf-quibble-selenium-php72-docker T297950