I'm working at a company that uses a firewall for internal users.
When I try to install npm
libraries I get this error message
C:\Users\me\source\repos\webpage [(1_0_0)]> npm install -g puppeteer
npm ERR! code 1
npm ERR! path C:\Users\me\AppData\Roaming\npm\node_modules\puppeteer
npm ERR! command failed
npm ERR! command C:\WINDOWS\system32\cmd.exe /d /s /c node install.js
npm ERR! ERROR: Failed to set up Chrome r114.0.5735.133! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.
npm ERR! Error: unable to get local issuer certificate
npm ERR! at TLSSocket.onConnectSecure (node:_tls_wrap:1530:34)
npm ERR! at TLSSocket.emit (node:events:390:28)
npm ERR! at TLSSocket._finishInit (node:_tls_wrap:944:8)
npm ERR! at TLSWrap.ssl.onhandshakedone (node:_tls_wrap:725:12) {
npm ERR! code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY'
npm ERR! }
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\me\AppData\Local\npm-cache\_logs\2023-06-16T14_37_01_393Z-debug.log
But if I navigate via browser to https://registry.npmjs.org/, I can see the certificate is valid, and somehow approved by my company.
Is the error returned by npm install
caused by the firewall of the company ? Or is it something completely unrelated ?