Error msg on NPM Install Serverless -g (using Git Bash)

Error when installing npm serverless -g using git bash on windows 64bit env.

Linked to local certificate issue. Any suggestions for a fix?

Pls note, I have installed node v11.12, npm 1.1.62.

Error Msg is as follows:

$ npm install serverless -g
npm ERR! Error: unable to get local issuer certificate
npm ERR!     at TLSSocket.onConnectSecure (_tls_wrap.js:1177:34)
npm ERR!     at TLSSocket.emit (events.js:197:13)
npm ERR!     at TLSSocket._finishInit (_tls_wrap.js:668:8)

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "serverless" "-g"
npm ERR! cwd C:\Users\c812979
npm ERR! node -v v11.12.0
npm ERR! npm -v 1.1.62
npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     C:\Users\c812979\npm-debug.log
npm ERR! not ok code 0

Hmm I’m not sure what the issue here is but the NPM version seems really old? I’m currently on 6.x.

1 Like

Thanks Jayair! Will update version and check if this solves it :slight_smile:

1 Like