npm-check-updates
npm-check-updates copied to clipboard
v17 request error for private package with proxy enabled
- [x] I have searched for similar issues
May similar with https://github.com/raineorshine/npm-check-updates/issues/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.