gyp ERR! stack FetchError: request to https://nodejs.org/download/release/v16.17.0/node-v16.17.0-headers.tar.gz failed, reason: self signed certificate in certificate chain
Getting the following error when i run npm install -g @azure/static-web-apps-cli
Error details as below:
npm ERR! code 1
npm ERR! path C:\code\SWA\static-web-apps-cli\node_modules\keytar
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c prebuild-install || npm run build
npm ERR! > [email protected] build
npm ERR! > node-gyp rebuild
npm ERR! prebuild-install warn install self signed certificate in certificate chain
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.7 found at "C:\Users\pgottumukkala\AppData\Local\Programs\Python\Python310\python.exe"
npm ERR! gyp http GET https://nodejs.org/download/release/v16.17.0/node-v16.17.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/v16.17.0/node-v16.17.0-headers.tar.gz failed, reason: self signed certificate in certificate chain
npm ERR! gyp ERR! stack at ClientRequest.
Hi @gd-pgottumukkala , can you please provide us a little more information on what is the environment you're using for this. We have seen similar issues with the keytar package installation on the docker and WSLs.
Hi I am trying to run in VisualStudio code on windows environment
PS C:\RetailSimulatorForm\19Sept2021\PHA-SWA-PartnerHubUI> npm config set cafile C:\Material\SHA.pem
PS C:\RetailSimulatorForm\19Sept2021\PHA-SWA-PartnerHubUI> npm i keytar
npm ERR! code 1
npm ERR! path C:\RetailSimulatorForm\19Sept2021\PHA-SWA-PartnerHubUI\node_modules\keytar
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c prebuild-install || npm run build
npm ERR! > [email protected] build
npm ERR! > node-gyp rebuild
npm ERR! prebuild-install warn install self signed certificate in certificate chain
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.9.13 found at "C:\Users\pgottumukkala\AppData\Local\Programs\Python\Python39\python.exe"
npm ERR! gyp http GET https://nodejs.org/download/release/v16.13.0/SHASUMS256.txt
npm ERR! gyp http GET https://nodejs.org/download/release/v16.13.0/win-x86/node.lib
npm ERR! gyp http GET https://nodejs.org/download/release/v16.13.0/win-x64/node.lib
npm ERR! gyp http GET https://nodejs.org/download/release/v16.13.0/win-arm64/node.lib
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.13.0/win-arm64/node.lib failed, reason: self signed certificate in certificate chain
npm ERR! gyp ERR! stack at ClientRequest.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\pgottumukkala\AppData\Local\npm-cache_logs\2022-09-20T13_35_17_053Z-debug-0.log
PS C:\RetailSimulatorForm\19Sept2021\PHA-SWA-PartnerHubUI> npm config set cafile C:\Material\arm-64.pem
PS C:\RetailSimulatorForm\19Sept2021\PHA-SWA-PartnerHubUI> npm i keytar
npm ERR! code 1
npm ERR! path C:\RetailSimulatorForm\19Sept2021\PHA-SWA-PartnerHubUI\node_modules\keytar
npm ERR! command failed
npm ERR! command C:\Windows\system32\cmd.exe /d /s /c prebuild-install || npm run build
npm ERR! > [email protected] build
npm ERR! > node-gyp rebuild
npm ERR! prebuild-install warn install self signed certificate in certificate chain
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.9.13 found at "C:\Users\pgottumukkala\AppData\Local\Programs\Python\Python39\python.exe"
npm ERR! gyp http GET https://nodejs.org/download/release/v16.13.0/SHASUMS256.txt
npm ERR! gyp http GET https://nodejs.org/download/release/v16.13.0/win-x86/node.lib
npm ERR! gyp http GET https://nodejs.org/download/release/v16.13.0/win-x64/node.lib
npm ERR! gyp http GET https://nodejs.org/download/release/v16.13.0/win-arm64/node.lib
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.13.0/win-arm64/node.lib failed, reason: self signed certificate in certificate chain
npm ERR! gyp ERR! stack at ClientRequest.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\pgottumukkala\AppData\Local\npm-cache_logs\2022-09-20T13_37_06_558Z-debug-0.log PS C:\RetailSimulatorForm\19Sept2021\PHA-SWA-PartnerHubUI>
Hi Can we meet on call to resolve this issue?
Any update on this issue? I ran into the same error when trying to install using Bash command prompt in Visual Studio code.
hitting the same issue with latest version when installing behind a zscaler installation. pointing to the cert files did not help. any hint how to install SWA in such setup. disabling the zscaler is not possible due to the in-place policies on this.
hello Team, I am also facing same issue. How did you resolve the issue? Please help me on this ...I am stuck for 3-4 days on this issue
Hello everyone! This is how I resolved my node-gyp error
If you're on windows: Install .NET latest, on their website through a manual installation. https://dotnet.microsoft.com/en-us/download/dotnet-framework
And there's also a package for node to be able to access .net on windows https://github.com/nodejs/node-gyp#on-windows
Make sure dotnet is on Path Variables
I haven't been able to reproduce this on a devcontainer, and there is a noted workaround. If anyone is still having this issue on the 1.1.10 release, please open a new issue with full details on the environment.