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

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

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

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

Q&A

0回答

582閲覧

Firebase CLIを使いたい

yusuke.ao

総合スコア0

Firebase

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

0グッド

0クリップ

投稿2020/08/20 01:18

前提・実現したいこと

Windows10,cmd C:\Users\user>node -v v12.18.3 C:\Users\user>npm -v 6.14.6

Firebaseを使ったシステムを開発しようとしています。Firebaseでログイン機能の実装をしたく、FirebaseCLIをインストールしてみたところ、以下のようなエラーがでました。

期待動作

firebaseloginコマンドを打った後、Firebasecliコマンドが正しく打てる

発生している問題・エラーメッセージ

Error: An unexpected error has occurred.

エラー時に入力したコマンドは以下の通りです。

firebase login

コマンドからの返り値は以下です。

firebase login > i Firebase optionally collects CLI usage and error reporting information to help improve our products. Data is collected in accordance with Google's privacy policy (https://policies.google.com/privacy) and is not used to identify you. ? Allow Firebase to collect CLI usage and error reporting information? Yes i To change your data collection preference at any time, run `firebase logout` and log in again. Visit this URL on this device to log in: Googleの認証URL Waiting for authentication... Error: An unexpected error has occurred.

試したこと

  1. node.jsの再インストール
  2. firebase login nolocalhostでの実行
  3. 管理者権限での実行
  4. debug.logの調査

補足情報(FW/ツールのバージョンなど)

ここにより詳細な情報を記載してください。

debug.log [debug] [2020-08-20T00:20:42.931Z] ---------------------------------------------------------------------- [debug] [2020-08-20T00:20:42.933Z] Command: C:\Program Files\nodejs\node.exe C:\Users\user\AppData\Roaming\npm\node_modules\firebase-tools\lib\bin\firebase.js login [debug] [2020-08-20T00:20:42.933Z] CLI Version: 8.7.0 [debug] [2020-08-20T00:20:42.933Z] Platform: win32 [debug] [2020-08-20T00:20:42.933Z] Node Version: v12.18.3 [debug] [2020-08-20T00:20:42.934Z] Time: Thu Aug 20 2020 09:20:42 GMT+0900 (GMT+09:00) [debug] [2020-08-20T00:20:42.934Z] ---------------------------------------------------------------------- [debug] [2020-08-20T00:20:42.934Z] [info] i Firebase optionally collects CLI usage and error reporting information to help improve our products. Data is collected in accordance with Google's privacy policy (https://policies.google.com/privacy) and is not used to identify you. [info] i To change your data collection preference at any time, run `firebase logout` and log in again. [info] [info] Visit this URL on this device to log in: [info]Google認証URL [info] [info] Waiting for authentication... [debug] [2020-08-20T00:20:46.525Z] Error: spawn cmd ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19) at onErrorNT (internal/child_process.js:469:16) at processTicksAndRejections (internal/process/task_queues.js:84:21) [error] [error] Error: An unexpected error has occurred. [debug] [2020-08-20T00:45:23.249Z] ---------------------------------------------------------------------- [debug] [2020-08-20T00:45:23.251Z] Command: C:\Program Files\nodejs\node.exe C:\Users\user\AppData\Roaming\npm\node_modules\firebase-tools\lib\bin\firebase.js login [debug] [2020-08-20T00:45:23.251Z] CLI Version: 8.7.0 [debug] [2020-08-20T00:45:23.251Z] Platform: win32 [debug] [2020-08-20T00:45:23.251Z] Node Version: v12.18.3 [debug] [2020-08-20T00:45:23.252Z] Time: Thu Aug 20 2020 09:45:23 GMT+0900 (GMT+09:00) [debug] [2020-08-20T00:45:23.252Z] ---------------------------------------------------------------------- [debug] [2020-08-20T00:45:23.252Z] [info] i Firebase optionally collects CLI usage and error reporting information to help improve our products. Data is collected in accordance with Google's privacy policy (https://policies.google.com/privacy) and is not used to identify you. [info] i To change your data collection preference at any time, run `firebase logout` and log in again. [info] [info] Visit this URL on this device to log in: [info] Google認証URL [info] [info] Waiting for authentication... [debug] [2020-08-20T00:45:24.997Z] Error: spawn cmd ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19) at onErrorNT (internal/child_process.js:469:16) at processTicksAndRejections (internal/process/task_queues.js:84:21) [error] [error] Error: An unexpected error has occurred.

エラー発生時前までのコマンド

C:\Users\user>npm install -g firebase-tools npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated har-validator@5.1.5: this library is no longer supported C:\Users\user\AppData\Roaming\npm\firebase -> C:\Users\user\AppData\Roaming\npm\node_modules\firebase-tools\lib\bin\firebase.js npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.2 (node_modules\firebase-tools\node_modules\chokidar\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) + firebase-tools@8.7.0 updated 1 package in 18.358s C:\Users\user>firebase Usage: firebase [options] [command] 一部割愛 C:\Users\user>firebase --version 8.7.0

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

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

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

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

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

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

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

ただいまの回答率
85.48%

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

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

質問する

関連した質問