最近ずっと使っていたMacBookProが歪んできていて、修理出さないとヤバそうな雰囲気なのでとりあえずMac Miniに買って開発環境を作ってる。
普通に既存のプロジェクトをgit cloneしてきて、npm(yarn) installすれば動くだろうと思ってたら動かない…
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
$ firebase emulators:start
⚠ emulators: You are not currently authenticated so some features may not work correctly. Please run firebase login to authenticate the CLI.
i emulators: Starting emulators: auth, functions, firestore, hosting, pubsub
⚠ functions: The following emulators are not running, calls to these services from the Functions emulator will affect production: database
✔ functions: Using node@12 from host.
⚠ functions: You are not signed in to the Firebase CLI. If you have authorized this machine using gcloud application-default credentials those may be discovered and used to access production services.
⚠ functions: Unable to fetch project Admin SDK configuration, Admin SDK behavior in Cloud Functions emulator may be incorrect.
i firestore: Firestore Emulator logging to firestore-debug.log
⚠ firestore: Fatal error occurred:
Firestore Emulator has exited with code: 1,
stopping all running emulators
i functions: Stopping Functions Emulator
i firestore: Stopping Firestore Emulator
⚠ firestore: Error stopping Firestore Emulator
i hub: Stopping emulator hub
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
|
firestore-dubug.log
を確認してみるとJavaがないと言われてた(笑)
1
2
|
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.
|
M1 MacにJavaを入れる
Azul SystemsからJDK11を落としてくればよさそう。
Appleシリコン搭載Mac用のJavaをAzulが公開。マイクロソフトと協力して開発
ダウンロードしてきたら、あとはクリックしてインストールするだけ。
これで再度Firebase emulatorを実行すると起動することができる。