質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.46%
Firebase

Firebaseは、Googleが提供するBasSサービスの一つ。リアルタイム通知可能、並びにアクセス制御ができるオブジェクトデータベース機能を備えます。さらに認証機能、アプリケーションのログ解析機能などの利用も可能です。

terminal

Terminalは、Apple社のmacOSに標準で付属しているUNIX端末エミュレータ。UNIXコマンドによってMacの操作および設定を行うことができます。

React.js

Reactは、アプリケーションのインターフェースを構築するためのオープンソースJavaScriptライブラリです。

Q&A

解決済

1回答

1194閲覧

Firebaseにloginできない(React)

Shmupeiii

総合スコア105

Firebase

Firebaseは、Googleが提供するBasSサービスの一つ。リアルタイム通知可能、並びにアクセス制御ができるオブジェクトデータベース機能を備えます。さらに認証機能、アプリケーションのログ解析機能などの利用も可能です。

terminal

Terminalは、Apple社のmacOSに標準で付属しているUNIX端末エミュレータ。UNIXコマンドによってMacの操作および設定を行うことができます。

React.js

Reactは、アプリケーションのインターフェースを構築するためのオープンソースJavaScriptライブラリです。

0グッド

0クリップ

投稿2021/09/12 15:19

こちらの動画 https://www.youtube.com/watch?v=ta2m6nfYHuQ&t=891s
を参考にし、MacにてReactフォルダをFirebaseにアップしようと試したところうまくログインできませんでした。

まず最初にvsdcodeのyoutubeのフォルダを選択した状態で、
vscode内のターミナル(bash)にて下記のコマンドを実行しました。

terminal

1ABemcp:youtube abeshmupeii$ npx create-react-app chatbot-demo 2 3Success! Created chatbot-demo at /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo 4Inside that directory, you can run several commands: 5 6 yarn start 7 Starts the development server. 8 9 yarn build 10 Bundles the app into static files for production. 11 12 yarn test 13 Starts the test runner. 14 15 yarn eject 16 Removes this tool and copies build dependencies, configuration files 17 and scripts into the app directory. If you do this, you can’t go back! 18 19We suggest that you begin by typing: 20 21 cd chatbot-demo 22 yarn start 23 24Happy hacking!

でreactの環境構築を行いました。
その次にFirebase内で、chatbot-demoというプロジェクトを作成しました。
その次に npm install -g firebase-toolを実行しました

terminal

1ABemcp:youtube abeshmupeii$ npm install -g firebase-tool

を行おうとしましたが、以前ダウンロードしたことがあるので、飛ばしました。(動画内で説明があり、一度ダウンロードすれば不要と説明されていた)
その後 npm install --save firebase と実行しました。

terminal

1ABemcp:chatbot-demo abeshmupeii$ npm install --save firebase 2npm WARN deprecated @hapi/topo@3.1.6: This version has been deprecated and is no longer supported or maintained 3npm WARN deprecated @hapi/address@2.1.4: Moved to 'npm install @sideway/address' 4npm WARN deprecated @hapi/bourne@1.3.2: This version has been deprecated and is no longer supported or maintained 5npm WARN deprecated @hapi/hoek@8.5.1: This version has been deprecated and is no longer supported or maintained 6npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated 7npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated 8npm WARN deprecated core-js@2.6.12: core-js@<3.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Please, upgrade your dependencies to the actual version of core-js. 9npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. 10npm WARN deprecated @types/anymatch@3.0.0: This is a stub types definition. anymatch provides its own type definitions, so you do not need this installed. 11npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. 12npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. 13npm WARN deprecated rollup-plugin-babel@4.4.0: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-babel. 14npm WARN rm not removing /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo/node_modules/.bin/jest as it wasn't installed by /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo/node_modules/jest 15npm WARN rm not removing /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo/node_modules/.bin/rimraf as it wasn't installed by /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo/node_modules/rimraf 16npm WARN rm not removing /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo/node_modules/.bin/uuid as it wasn't installed by /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo/node_modules/uuid 17npm WARN rm not removing /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo/node_modules/.bin/semver as it wasn't installed by /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo/node_modules/semver 18npm WARN rm not removing /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo/node_modules/.bin/mkdirp as it wasn't installed by /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo/node_modules/mkdirp 19npm WARN rm not removing /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo/node_modules/.bin/json5 as it wasn't installed by /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo/node_modules/json5 20 21> fsevents@1.2.13 install /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo/node_modules/watchpack-chokidar2/node_modules/fsevents 22> node install.js 23 24No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'. 25 26No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'. 27 28No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'. 29 30gyp: No Xcode or CLT version detected! 31gyp ERR! configure error 32gyp ERR! stack Error: `gyp` failed with exit code: 1 33gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16) 34gyp ERR! stack at ChildProcess.emit (events.js:315:20) 35gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) 36gyp ERR! System Darwin 20.6.0 37gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 38gyp ERR! cwd /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo/node_modules/watchpack-chokidar2/node_modules/fsevents 39gyp ERR! node -v v14.15.2 40gyp ERR! node-gyp -v v5.1.0 41gyp ERR! not ok 42 43> fsevents@1.2.13 install /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo/node_modules/webpack-dev-server/node_modules/fsevents 44> node install.js 45 46No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'. 47 48No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'. 49 50No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'. 51 52gyp: No Xcode or CLT version detected! 53gyp ERR! configure error 54gyp ERR! stack Error: `gyp` failed with exit code: 1 55gyp ERR! stack at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16) 56gyp ERR! stack at ChildProcess.emit (events.js:315:20) 57gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) 58gyp ERR! System Darwin 20.6.0 59gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 60gyp ERR! cwd /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo/node_modules/webpack-dev-server/node_modules/fsevents 61gyp ERR! node -v v14.15.2 62gyp ERR! node-gyp -v v5.1.0 63gyp ERR! not ok 64 65> core-js@3.6.5 postinstall /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo/node_modules/@firebase/polyfill/node_modules/core-js 66> node -e "try{require('./postinstall')}catch(e){}" 67 68Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library! 69 70The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 71> https://opencollective.com/core-js 72> https://www.patreon.com/zloirock 73 74Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -) 75 76 77> core-js@2.6.12 postinstall /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo/node_modules/babel-runtime/node_modules/core-js 78> node -e "try{require('./postinstall')}catch(e){}" 79 80 81> core-js@3.17.3 postinstall /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo/node_modules/core-js 82> node -e "try{require('./postinstall')}catch(e){}" 83 84Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library! 85 86The project needs your help! Please consider supporting of core-js: 87> https://opencollective.com/core-js 88> https://patreon.com/zloirock 89> https://paypal.me/zloirock 90> bitcoin: bc1qlea7544qtsmj2rayg0lthvza9fau63ux0fstcz 91 92Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -) 93 94 95> core-js-pure@3.17.3 postinstall /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo/node_modules/core-js-pure 96> node -e "try{require('./postinstall')}catch(e){}" 97 98 99> ejs@2.7.4 postinstall /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo/node_modules/ejs 100> node ./postinstall.js 101 102Thank you for installing EJS: built with the Jake JavaScript build tool (https://jakejs.com/) 103 104 105> protobufjs@6.11.2 postinstall /Users/abeshmupeii/Desktop/react/youtube/chatbot-demo/node_modules/protobufjs 106> node scripts/postinstall 107 108npm notice created a lockfile as package-lock.json. You should commit this file. 109npm WARN @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@7.15.4 requires a peer of @babel/core@^7.13.0 but none is installed. You must install peer dependencies yourself. 110npm WARN tsutils@3.21.0 requires a peer of typescript@>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta but none is installed. You must install peer dependencies yourself. 111 112+ firebase@9.0.2 113added 388 packages from 144 contributors, removed 249 packages, updated 1451 packages and audited 1846 packages in 191.442s 114 115147 packages are looking for funding 116 run `npm fund` for details 117 118found 4 moderate severity vulnerabilities 119 run `npm audit fix` to fix them, or `npm audit` for details

最後にfirebase loginを試みたんですがエラーが表記されました。

terminal

1ABemcp:chatbot-demo abeshmupeii$ firebase login 2bash: firebase: command not found

この場合npm install --save firebaseが正常に行われなかったため起ったのでしょうか。
長くて申し訳ありませんがよろしくお願いいたします。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

hoshi-takanori

2021/09/12 19:17

とりあえず「Command Line Tools for Xcode」が見当たらないために npm install --save firebase が失敗してるようなので、 xcode-select --install を実行してみては。
Shmupeiii

2021/09/13 04:39

返信ありがとうございます。 vscodeのterminalで試したところ ABemcp:chatbot-demo abeshmupeii$ xcode-select --install xcode-select: error: command line tools are already installed, use "Software Update" to install updates と表記が出て、macのターミナルでも同様の表記が出ました。 よろしくお願いします。
guest

回答1

0

自己解決

再度調べたら解決できました。

投稿2022/01/25 00:04

Shmupeiii

総合スコア105

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.46%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問