OS: Windows 11
Node: 16
I am trying to install grunt-cli globally in Windows 11. I tried following command:
npm i grunt-cli -g
and getting the following error:
npm ERR! code UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! errno UNABLE_TO_VERIFY_LEAF_SIGNATURE
npm ERR! request to https://registry.npmjs.org/grunt-cli failed, reason: unable to verify the first certificate
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\USER\AppData\Local\npm-cache\_logs\2023-07-20T07_00_36_434Z-debug-0.log
I tried setting the following in npm configuration:
export NODE_TLS_REJECT_UNAUTHORIZED=0
npm config set registry http://registry.npmjs.org/
Validated using
npm config get registry
I am not sure what could be causing this issue, any suggestions on how to address this?