auの日記

プログラミング初心者の日記。(auはハンドルネームです)

React Nativeでパッケージをinstallするときにエラーが出る

auです。

React Nativeでモジュールをinstallしようとするとエラーが出ます。

npmのバージョン違いのようですが、Gitの中身をみても書いてないように思えました。

npm install react-native-google-speech-api --save
npm ERR! code ENOVERSIONS
npm ERR! No valid versions available for react-native-google-speech-api

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/username/.npm/_logs/2020-02-17T09_32_49_221Z-debug.log

debug-logには以下のようになってました。

0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/usr/local/bin/node',
1 verbose cli   '/Users/username/.npm-global/bin/npm',
1 verbose cli   'install',
1 verbose cli   'react-native-google-speech-api',
1 verbose cli   '--save'
1 verbose cli ]
2 info using npm@6.11.3
3 info using node@v12.15.0
4 verbose npm-session 60d8525e884fbcde
5 silly install loadCurrentTree
6 silly install readLocalPackageData
7 http fetch GET 304 https://registry.npmjs.org/react-native-google-speech-api 107ms (from cache)
8 silly fetchPackageMetaData error for react-native-google-speech-api@latest No valid versions available for react-native-google-speech-api
9 timing stage:rollbackFailedOptional Completed in 1ms
10 timing stage:runTopLevelLifecycles Completed in 837ms
11 verbose type tag
12 verbose stack react-native-google-speech-api: No valid versions available for react-native-google-speech-api
12 verbose stack     at pickManifest (/Users/username/.npm-global/lib/node_modules/npm/node_modules/npm-pick-manifest/index.js:39:11)
12 verbose stack     at /Users/username/.npm-global/lib/node_modules/npm/node_modules/pacote/lib/fetchers/registry/manifest.js:24:14
12 verbose stack     at tryCatcher (/Users/username/.npm-global/lib/node_modules/npm/node_modules/bluebird/js/release/util.js:16:23)
12 verbose stack     at Promise._settlePromiseFromHandler (/Users/username/.npm-global/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:517:31)
12 verbose stack     at Promise._settlePromise (/Users/username/.npm-global/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:574:18)
12 verbose stack     at Promise._settlePromise0 (/Users/username/.npm-global/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:619:10)
12 verbose stack     at Promise._settlePromises (/Users/username/.npm-global/lib/node_modules/npm/node_modules/bluebird/js/release/promise.js:699:18)
12 verbose stack     at _drainQueueStep (/Users/username/.npm-global/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:138:12)
12 verbose stack     at _drainQueue (/Users/username/.npm-global/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:131:9)
12 verbose stack     at Async._drainQueues (/Users/username/.npm-global/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:147:5)
12 verbose stack     at Immediate.Async.drainQueues [as _onImmediate] (/Users/username/.npm-global/lib/node_modules/npm/node_modules/bluebird/js/release/async.js:17:14)
12 verbose stack     at processImmediate (internal/timers.js:439:21)
13 verbose cwd /Users/username/Intern/speech_coding/speech-coding/SpeechCoding
14 verbose Darwin 18.7.0
15 verbose argv "/usr/local/bin/node" "/Users/username/.npm-global/bin/npm" "install" "react-native-google-speech-api" "--save"
16 verbose node v12.15.0
17 verbose npm  v6.11.3
18 error code ENOVERSIONS
19 error No valid versions available for react-native-google-speech-api
20 verbose exit [ 1, true ]

うーん、npmとnodeのバージョンは僕のものでした。では、このモジュールに対応しているnpmかnodeのバージョンを知るにはどうすればいいんだろう・・・?