Skip to content
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

node 18.15+ gives certificate error, but not node v18.14.2 #2838

Open
msci-victor opened this issue May 2, 2023 · 4 comments
Open

node 18.15+ gives certificate error, but not node v18.14.2 #2838

msci-victor opened this issue May 2, 2023 · 4 comments
Labels

Comments

@msci-victor
Copy link

msci-victor commented May 2, 2023

Version

v18.5.0

Platform

Microsoft Windows NT 10.0.19045.0

Subsystem

No response

What steps will reproduce the bug?

Doing npm install or yarn install

How often does it reproduce? Is there a required condition?

Every time

What is the expected behavior? Why is that the expected behavior?

All dependencies should be installed without error.

What do you see instead?

It fails on a step where it tries to get nodejs headers.

C:\Users\user1\Git\frontend>npm install
npm ERR! code 1
npm ERR! path C:\Users\user1\Git\frontend\node_modules\deasync
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node ./build.js
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.10.4 found at "C:\Python310\python.exe"
npm ERR! gyp http GET https://nodejs.org/download/release/v18.16.0/node-v18.16.0-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/v18.16.0/node-v18.16.0-headers.tar.gz failed, reason: self-signed certificate in certificate chain
npm ERR! gyp ERR! stack     at ClientRequest.<anonymous> (C:\Users\user1\Git\frontend\node_modules\minipass-fetch\lib\index.js:130:14)
npm ERR! gyp ERR! stack     at ClientRequest.emit (node:events:513:28)
npm ERR! gyp ERR! stack     at TLSSocket.socketErrorListener (node:_http_client:502:9)
npm ERR! gyp ERR! stack     at TLSSocket.emit (node:events:525:35)
npm ERR! gyp ERR! stack     at emitErrorNT (node:internal/streams/destroy:151:8)
npm ERR! gyp ERR! stack     at emitErrorCloseNT (node:internal/streams/destroy:116:3)
npm ERR! gyp ERR! stack     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
npm ERR! gyp ERR! System Windows_NT 10.0.19045
npm ERR! gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\user1\\Git\\frontend\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
npm ERR! gyp ERR! cwd C:\Users\user1\Git\frontend\node_modules\deasync
npm ERR! gyp ERR! node -v v18.16.0
npm ERR! gyp ERR! node-gyp -v v9.3.1
npm ERR! gyp ERR! not ok
npm ERR! Build failed

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\user1\AppData\Local\npm-cache\_logs\2023-05-02T05_19_59_225Z-debug-0.log

Additional information

When I switch back to using node v18.14.2 everything is being installed correctly. I've tried to skim though the changes in v18.15.0, but couldn't find anything obvious.

I get the same result with v18.16.0.

Edit:
I just tried to do ...\node-gyp\bin>node node-gyp.js install and get the same issue on 18.14.2, so it seems like some dependencies act differently between v18.14.2 and v18.15+

@bnoordhuis
Copy link
Member

bnoordhuis commented May 2, 2023

Bug reports for node-gyp should be reported over at https://github.com/nodejs/node-gyp.

I don't think there were changes between node v18.14.2 and v18.15.0 that could be responsible but if you have a small test case (no third-party dependencies) that shows otherwise, we can take a look.

@bnoordhuis
Copy link
Member

I see you edited your report. The conclusion is that it is indeed likely a node-gyp issue? I'll move it to that repo then.

@bnoordhuis bnoordhuis transferred this issue from nodejs/node May 5, 2023
@huseyinacacak-janea
Copy link
Contributor

@msci-victor
I created a package.json file with the following dependencies and ran npm install. However, I was not able to reproduce the issue with the latest versions of Node.js (23.0.0, 22.9.0, 20.18.0, and 18.20.4). Could you provide the steps to reproduce the issue locally?

"dependencies": {
  "deasync": "^0.1.30",
  "node-gyp": "^10.2.0"
}

@cclauss
Copy link
Contributor

cclauss commented Oct 22, 2024

Is this a duplicate of

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

No branches or pull requests

4 participants