I'm trying to migrate from npm to Yarn. When I tried to install dependencies through yarn, I'm getting this error.
unable to verify the first certificate
at Error (native)
at TLSSocket.<anonymous> (_tls_wrap.js:1055:38)
at emitNone (events.js:86:13)
at TLSSocket.emit (events.js:185:7)
at TLSSocket._finishInit (_tls_wrap.js:580:8)
at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:412:38)
Same works fine with npm. Tried setting proxy, didn't help.Is there any configuration I need to change?
If the certificate is unable to be verfied, you can open set strict-ssl to false. You should be able to configure this by runnning
yarn config set "strict-ssl" false -g
But the command is currently not working, see issue 980.
As an alternative you can navigate to C:\Users\\ and open .yarnrc
and manually update it as follows:
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
strict-ssl false