-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] install
and cache add
disagrees on accept header
#7465
Labels
Comments
hundeboll
added
Bug
thing that needs fixing
Needs Triage
needs review for next steps
Release 10.x
labels
May 3, 2024
milaninfy
added
Priority 2
secondary priority issue
Needs Triage
needs review for next steps
and removed
Needs Triage
needs review for next steps
Priority 2
secondary priority issue
labels
May 3, 2024
kraj
pushed a commit
to YoeDistro/meta-openembedded
that referenced
this issue
May 3, 2024
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: npm/cli#7465 Signed-off-by: Martin Hundebøll <[email protected]> Signed-off-by: Khem Raj <[email protected]>
wraithgar
added
Priority 2
secondary priority issue
and removed
Needs Triage
needs review for next steps
labels
May 3, 2024
daregit
pushed a commit
to daregit/yocto-combined
that referenced
this issue
May 22, 2024
…ncies 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: npm/cli#7465 Signed-off-by: Martin Hundebøll <[email protected]> Signed-off-by: Khem Raj <[email protected]>
wraithgar
pushed a commit
that referenced
this issue
May 22, 2024
This will fix the `npm cache add` to cache package with same header as it's used in `npm install` by adding extra manifest call with `fullMetadata: true` while caching to match behaviour with install command which internally request manifest with fullMetadata. ## References Closes #7465
halstead
pushed a commit
to openembedded/meta-openembedded
that referenced
this issue
May 22, 2024
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: npm/cli#7465 Signed-off-by: Martin Hundebøll <[email protected]> Signed-off-by: Khem Raj <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
Offline installs fails with
ENOTCACHED
after caching dependencies usingnpm cache add <dep>
:Expected Behavior
Steps To Reproduce
As above:
Findings
By comparing the output of
from populating the cache with first
npm install
and then withnpm cache add
I found that theaccept:
header is different:npm install
:accept: 'application/json'
npm cache add
:accept: 'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*'
Environment
The text was updated successfully, but these errors were encountered: