前提・実現したいこと
npm で react-native-cli をインストールしようとすると以下のエラーが発生します。
ReactNative は普段 Expo で開発を行っているのですが、今回はネイティブコードも組み込んでいきたいので react-native-cli を入れたいという状況です。
このエラーは環境によるもの?なのでしょうか。それとも何か解決方法があるでしょうか。
発生している問題・エラーメッセージ
$ npm install -g react-native-cli npm ERR! request to https://registry.npmjs.org/react-native-cli failed, reason: Hostname/IP doesn't match certificate's altnames: "Host: registry.npmjs.org. is not in the cert's altnames: DNS:a.sni.fastly.net, DNS:a.sni.global-ssl.fastly.net" npm ERR! A complete log of this run can be found in: npm ERR! /Users/tanakakota/.npm/_logs/2018-09-01T11_54_26_232Z-debug.log
$ cat /Users/tanakakota/.npm/_logs/2018-09-01T11_54_26_232Z-debug.log 0 info it worked if it ends with ok 1 verbose cli [ '/usr/local/bin/node', 1 verbose cli '/usr/local/bin/npm', 1 verbose cli 'install', 1 verbose cli '-g', 1 verbose cli 'react-native-cli' ] 2 info using npm@6.2.0 3 info using node@v8.11.1 4 verbose npm-session a5a3370e9e8f53fc 5 silly install loadCurrentTree 6 silly install readGlobalPackageData 7 silly fetchPackageMetaData error for react-native-cli@latest request to https://registry.npmjs.org/react-native-cli failed, reason: Hostname/IP doesn't match certificate's altnames: "Host: registry.npmjs.org. is not in the cert's altnames: DNS:a.sni.fastly.net, DNS:a.sni.global-ssl.fastly.net" 8 timing stage:rollbackFailedOptional Completed in 2ms 9 timing stage:runTopLevelLifecycles Completed in 287ms 10 verbose type system 11 verbose stack FetchError: request to https://registry.npmjs.org/react-native-cli failed, reason: Hostname/IP doesn't match certificate's altnames: "Host: registry.npmjs.org. is not in the cert's altnames: DNS:a.sni.fastly.net, DNS:a.sni.global-ssl.fastly.net" 11 verbose stack at ClientRequest.req.on.err (/usr/local/lib/node_modules/npm/node_modules/node-fetch-npm/src/index.js:68:14) 11 verbose stack at emitOne (events.js:116:13) 11 verbose stack at ClientRequest.emit (events.js:211:7) 11 verbose stack at TLSSocket.socketErrorListener (_http_client.js:387:9) 11 verbose stack at emitOne (events.js:116:13) 11 verbose stack at TLSSocket.emit (events.js:211:7) 11 verbose stack at emitErrorNT (internal/streams/destroy.js:64:8) 11 verbose stack at _combinedTickCallback (internal/process/next_tick.js:138:11) 11 verbose stack at process._tickCallback (internal/process/next_tick.js:180:9) 12 verbose cwd /Users/tanakakota/Bitbucket-local/react-goods-manager 13 verbose Darwin 17.4.0 14 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "react-native-cli" 15 verbose node v8.11.1 16 verbose npm v6.2.0 17 error request to https://registry.npmjs.org/react-native-cli failed, reason: Hostname/IP doesn't match certificate's altnames: "Host: registry.npmjs.org. is not in the cert's altnames: DNS:a.sni.fastly.net, DNS:a.sni.global-ssl.fastly.net" 18 verbose exit [ 1, true ]
あなたの回答
tips
プレビュー