DEV Community

John Peters
John Peters

Posted on • Updated on

Self Signed Cert error

 ng build
Building Angular Package

------------------------------------------------------------------------------
Building entry point 'msl'
------------------------------------------------------------------------------
Compiling TypeScript sources through ngc
Bundling to FESM2015
Error: self signed certificate in certificate chain
    at TLSSocket.onConnectSecure (_tls_wrap.js:1506:34)
    at TLSSocket.emit (events.js:315:20)
    at TLSSocket._finishInit (_tls_wrap.js:948:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:706:12) {
  code: 'SELF_SIGNED_CERT_IN_CHAIN'
}
Bundling to FESM5
Bundling to UMD
Minifying UMD bundle
Copying declaration files
Writing package metadata
Built msl

------------------------------------------------------------------------------
Built Angular Package!
 - from: D:\Source\MNLottery\CC\projects\msl
 - to:   D:\Source\MNLottery\CC\dist\msl
------------------------------------------------------------------------------
Error: self signed certificate in certificate chain
    at TLSSocket.onConnectSecure (_tls_wrap.js:1506:34)
    at TLSSocket.emit (events.js:315:20)
    at TLSSocket._finishInit (_tls_wrap.js:948:8)
    at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:706:12) {
  code: 'SELF_SIGNED_CERT_IN_CHAIN'
}
Enter fullscreen mode Exit fullscreen mode

Npm suggest making sure to run these commands

npm install npm -g --ca=""
npm config set ca=""
Enter fullscreen mode Exit fullscreen mode

Which did not work for this problem..

Alt Text

Whoever allowed (Angular) that error message to omit the offender name should be flogged.

Here's how to find it. Search node_modules folder for .pem files.

Top comments (0)