From 69a68d4ded832d4e9b5d5714e98d7fcfd2161746 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Hundeb=C3=B8ll?= Date: Fri, 3 May 2024 11:42:20 +0200 Subject: [PATCH] nodejs-oe-cache: fix offline install of dependencies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apparently, npm has changed its request accept header, so that cache lookup misses. This causes an ENOTCACHED error when doing the offline install in do_compile() from npm.bbclass. Fix it by updating the fake cache entry to match the newest behaviour from npm. Note that npm doesn't agree with itself, as it still uses the previous header value when doing `npm cache add `, but the new value when doing `npm install `. Bug submitted upstream: https://github.com/npm/cli/issues/7465 Signed-off-by: Martin Hundebøll Signed-off-by: Khem Raj --- .../recipes-devtools/nodejs/nodejs-oe-cache-20.12/oe-npm-cache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-20.12/oe-npm-cache b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-20.12/oe-npm-cache index f596207648..eb0f143eae 100755 --- a/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-20.12/oe-npm-cache +++ b/meta-oe/recipes-devtools/nodejs/nodejs-oe-cache-20.12/oe-npm-cache @@ -30,7 +30,7 @@ const xlate = { time: Date.now(), url: key, reqHeaders: { - 'accept': 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*', + 'accept': 'application/json', }, resHeaders: { "content-type": "application/json",