aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Hundebøll <martin@geanix.com>2024-05-03 11:42:20 +0200
committerKhem Raj <raj.khem@gmail.com>2024-05-22 12:44:19 -0700
commit6de0ab744341ad61b0661aa28d78dc6767ce0786 (patch)
treece459e2dd59f8d79efa60aa24004fc6491abc988
parenta72010b414ee3d73888ac9cb4e310e8f05e13aea (diff)
downloadmeta-openembedded-contrib-6de0ab744341ad61b0661aa28d78dc6767ce0786.tar.gz
nodejs-oe-cache: fix offline install of dependencies
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 <pkg>`, but the new value when doing `npm install <pkg>`. Bug submitted upstream: https://github.com/npm/cli/issues/7465 Signed-off-by: Martin Hundebøll <martin@geanix.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rwxr-xr-xmeta-oe/recipes-devtools/nodejs/nodejs-oe-cache-20.12/oe-npm-cache2
1 files changed, 1 insertions, 1 deletions
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",