Search code examples
node.jsmacosnpmgem-furynpm-login

Unable to log in to npm when .npmrc present in project root


I have a .npmrc file in project root level and if I do npm login it throws an error

npm ERR! code UNABLE_TO_GET_ISSUER_CERT_LOCALLY
npm ERR! errno UNABLE_TO_GET_ISSUER_CERT_LOCALLY

After deleting .npmrc I am able to log in. I have correct configuration for .npmrc as well

//npm-proxy.fury.io/myorg/:_authToken=mytoken
registry=https://npm-proxy.fury.io/myorg/

It tried to fetch from a private gemfury repository.

What I got to know is that the gemfury server cannot authenticate my machine from the token which I am having.

What could possibly go wrong here?


Solution

  • A workaround was found in https://github.com/npm/npm/issues/9580

    Fix is to make strict-ssl=false