私は自分のプライベート npm レジストリを持っていますhttp://something
。糸をインストールし、次のコマンドを実行しようとしました。
yarn
しかし、次のエラーが発生しています。
Trace:
Error: unable to get local issuer certificate
at Error (native)
at TLSSocket.<anonymous> (_tls_wrap.js:1017:38)
at emitNone (events.js:67:13)
at TLSSocket.emit (events.js:166:7)
at TLSSocket._init.ssl.onclienthello.ssl.oncertcb.TLSSocket._finishInit (_tls_wrap.js:582:8)
at TLSWrap.ssl.onclienthello.ssl.oncertcb.ssl.onnewsession.ssl.onhandshakedone (_tls_wrap.js:424:38)
githubの問題と解決策もいくつか見つかりました。
https://github.com/yarnpkg/yarn/issues/841 https://github.com/yarnpkg/yarn/commit/b0611a6ee5220b0b1e955b271b6140640158f96c (0.16.0 で利用可能)
strict-ssl
yarn config で false に設定する必要があるようです。どうすればそれを行うことができるかを正確に見つけることができません。package.json で以下の方法でオプションをつけてみましたがうまくいきませんでした。
1)
{
config: {
"strict-ssl": false
}
}
2)
{
"strict-ssl": false
}
しかし、それでも同じエラーが発生します。私はどこで間違っていますか?