前提・実現したいこと
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.
試したこと
- node.jsの再インストール
- firebase login nolocalhostでの実行
- 管理者権限での実行
- 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
あなたの回答
tips
プレビュー