unable to verify the first certificate
When I tried to execute ’npm install‘ command to download the dependencies, the error from node-gyp occurred. 'gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v20.11.1/node-v20.11.1-headers.tar.gz failed, reason: unable to verify the first certificate'
Here's the version
node v20.11.1
npm v10.2.4
node-gyp v10.0.1
it's an urgent issue for me, looking forward to your reply. : )
Hello! For me, it helped to disable and re-enable this property - npm config set strict-ssl false => npm config set strict-ssl true
The solution from @PaulWeb30 as strange it seems works for me as well.
Hello! For me, it helped to disable and re-enable this property - npm config set strict-ssl false => npm config set strict-ssl true
It didn't work for me. However, I've found another way to avoid this problem. You can download the node-headers.tar.gz from browser, and then set a new key-value pair in the .npmrc file. For Linux, 'tarball = /path/to/node-headers' can be added to the .npmrc file. For windows, setting 'nodedir = /path/to/node-headers' works.