-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Does not respect NODE_TLS_REJECT_UNAUTHORIZED #2663
Comments
I hit this in Node 16.14.0 and 16.16.0. However, 16.13 appears to work as expected. |
Appear to also be running into this. Seems to occur in corporate environments where they do deep packet inspection where they strip away the SSL to inspect the traffic and re-assemble it. Will try back down to a previous version of node as the comment above suggestions.
|
Confirming this is an issue with Node 16.17.1, here, as well. |
Having this issue as well. Is there some kind of workaround to manually build it or a way to install it without building it? |
Confirming this issue is still around in node v19.6.1 Seriously!? |
node-gyp switched to make-fetch-happen, which does not support this this environment variable ... |
Same issue. Setting NODE_EXTRA_CA_CERTS as per https://stackoverflow.com/questions/34608969/stack-error-self-signed-certificate-in-certificate-chain-when-trying-to-build resolved the issue for me on Node.js 20.x . |
As per @jbgomond this is caused by make-fetch-happen. replace |
… defined (#316) Currently NODE_TLS_REJECT_UNAUTHORIZED is simply ignored as options.rejectUnauthorized is always set to false when strictSSL is not defined. Most notably this causes issues for users behind corporate proxies using npm and pnpm when installing a package that uses node-gyp. Example: nodejs/node-gyp#2663 This change only takes into account NODE_TLS_REJECT_UNAUTHORIZED when strictSSL is not passed to fetch. unit tests were added to ensure strictSSL is still the primary driver. Co-authored-by: Bruno Oliveira <boliveira@citco.com>
Linux xoa 5.10.0-13-amd64 #1 SMP Debian 5.10.106-1 (2022-03-17) x86_64 GNU/Linux
Verbose output (from npm or node-gyp):
From what I could gather:
make-fetch-happens
without usingstrictSSL
(source)strictSSL
defaults tofalse
if not specified (source)minipass-fetch
'sNODE_TLS_REJECT_UNAUTHORIZED
handling is not triggered (source)The text was updated successfully, but these errors were encountered: