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 <mar...@geanix.com>
---
 .../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 f59620764..eb0f143ea 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",
-- 
2.44.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#110244): 
https://lists.openembedded.org/g/openembedded-devel/message/110244
Mute This Topic: https://lists.openembedded.org/mt/105884883/21656
Group Owner: openembedded-devel+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to