help icon indicating copy to clipboard operation
help copied to clipboard

npm ERR! gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v16.14.2/node-v16.14.2-headers.tar.gz failed, reason: self signed certificate in certificate chain

Open yitzikz opened this issue 3 years ago • 3 comments

Details

When I try to install winax or win32ole package

I get the following error below

I tried:

  1. npm config set strict-ssl false and
  2. set NODE_TLS_REJECT_UNAUTHORIZED=0 and
  3. npm config set ca ""

nothing helps :(

npm ERR! code 1
npm ERR! path D:\WebDev\Node\PusherPoll\node_modules\winax
npm ERR! command failed
npm ERR! command C:\windows\system32\cmd.exe /d /s /c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | win32 | x64
npm ERR! gyp info find Python using Python version 3.8.6 found at "C:\Program Files\Python38\python.exe"
npm ERR! gyp http GET https://nodejs.org/download/release/v16.14.2/node-v16.14.2-headers.tar.gz
npm ERR! gyp WARN install got an error, rolling back install
npm ERR! gyp ERR! configure error
npm ERR! gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v16.14.2/node-v16.14.2-headers.tar.gz failed, reason: self signed certificate in certificate chain
npm ERR! gyp ERR! stack     at ClientRequest.<anonymous> (D:\Data\Users\yitzi-zi\AppData\Roaming\npm\node_modules\npm\node_modules\minipass-fetch\lib\index.js:130:14)
npm ERR! gyp ERR! stack     at ClientRequest.emit (node:events:526:28)
npm ERR! gyp ERR! stack     at TLSSocket.socketErrorListener (node:_http_client:442:9)
npm ERR! gyp ERR! stack     at emitErrorNT (node:internal/streams/destroy:157:8)
npm ERR! gyp ERR! stack     at emitErrorCloseNT (node:internal/streams/destroy:122:3)
npm ERR! gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:83:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19042
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "D:\\Data\\Users\\yitzi-zi\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd D:\WebDev\Node\PusherPoll\node_modules\winax
npm ERR! gyp ERR! node -v v16.14.2
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok

Node.js version

v16.14.2

Example code

No response

Operating system

Windows 7

Scope

npm install winax or npm install win32ole

Module and version

Not applicable.

yitzikz avatar Mar 22 '22 10:03 yitzikz

I'm experiencing this as well in v16.14+

v16.13 seems to work as expected.

tonjohn avatar Jul 13 '22 18:07 tonjohn

一样的问题,更换v16.17.0, v18.12.0...最后安装最新的v19.0.0运行正常

wrennywang avatar Oct 27 '22 02:10 wrennywang

same error in v20.11.1

CedricChing avatar Feb 29 '24 11:02 CedricChing

Hi there, if this issue is reprocible with the latest and/or LTS version of Node.js. Please open a single new issue, with all information needed to reproduce.

avivkeller avatar Jun 28 '24 23:06 avivkeller

这是来自QQ邮箱的自动回复邮件。您好,我已收到您发送的邮件,我会及时查看。非常感谢您的联系!

CedricChing avatar Jun 28 '24 23:06 CedricChing