Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

v17 request error for private package with proxy enabled #1456

Open
1 task done
shaunxu opened this issue Sep 19, 2024 · 2 comments
Open
1 task done

v17 request error for private package with proxy enabled #1456

shaunxu opened this issue Sep 19, 2024 · 2 comments
Labels

Comments

@shaunxu
Copy link

shaunxu commented Sep 19, 2024

May similar with #1436


Steps to Reproduce

Private packages defined in package.json, use proxy, ether though environment variant HTTPS_PROXY=http://HOST:PORT, or through .npmrc, will cause ncu response 400 Bad Request.

For example HTTPS_PROXY=http://HOST:PORT npx ncu

Current Behavior

[================----] 4/5 80%vL: 400 Bad request - GET https://npm.pkg.github.com/@atinc/chaos
    at /Users/shaunxu/github/parthenon/node_modules/npm-check-updates/build/index.js:347:925
    at process.processTicksAndRejections (node:internal/process/task_queues:105:5) {
  headers: [Object: null prototype] {
    'content-length': [ '90' ],
    'cache-control': [ 'no-cache' ],
    connection: [ 'close' ],
    'content-type': [ 'text/html' ],
    'x-fetch-attempts': [ '1' ]
  },
  statusCode: 400,
  code: 'E400',
  method: 'GET',
  uri: 'https://npm.pkg.github.com/@atinc/chaos',
  body: <Buffer 3c 68 74 6d 6c 3e 3c 62 6f 64 79 3e 3c 68 31 3e 34 30 30 20 42 61 64 20 72 65 71 75 65 73 74 3c 2f 68 31 3e 0a 59 6f 75 72 20 62 72 6f 77 73 65 72 20 ... 40 more bytes>,
  pkgid: '@atinc/chaos'
}

Expected Behavior

Successful check.

@raineorshine
Copy link
Owner

Thanks for reporting. Given the specifics of npm config and authentication particular to each case, the best way to assist on this issue is to investigate it on the machine where it originates. It's difficult for me to reproduce the specific credentials on my machine. I'm happy to answer any questions you might have about the codebase.

@shaunxu
Copy link
Author

shaunxu commented Sep 20, 2024

Thanks @raineorshine I will try to provide more details for future investigation.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants