ローカルで
$ firebase serve --only hosting,functions
とかやると
Warning: You're using Node.js v8.9.4 but Google Cloud Functions only supports v6.11.5.
上記のようなメッセージが出てしまいます。v6.11.5.しかサポートしていないんですね。
個人的にはasync/await
を使いたくて、絶望していました。
しかし先日以下の記事を発見しました。
The Node.js 8 Runtime | Cloud Functions Documentation | Google Cloud
Google Cloudではベータ版という位置づけでNode.js 8が使えるようです!
ということでGoogle Cloudのコンソール画面に行き、Firebaseで使っているfunctionsのRuntimeをNode.js 8
にしたら…
$ firebase deploy --only hosting,functions
・
・
✔ functions[ssrapp(us-central1)]: Successful update operation.
✔ Deploy complete!
async/await
を使用しているfunctionsのdeployが成功しました(以前は失敗していた)!