$ firebase serve --only functions
⚠ Your requested "node" version "8" doesn't match your global version "12"
Error: TIMEOUT: Port 5000 was not active within 30000ms
but when serve hosting will success
$ firebase serve --only hosting
i hosting: Serving hosting files from: dist/chongsheng-jp
✔ hosting: Local server: http://localhost:5000
I thought that I didn't compile index.ts, I tried npm run serve
following firebase official doc but It doesn't work.
Please help me.
Here is my versions.
"firebase-admin": "^8.0.0",
"firebase-functions": "^3.1.0"
node -v
v12.3.1
firebase --version
7.1.0
I use ubuntu on WSL(not wsl2) and version is below
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
and here is my code (index.ts)
const functions = require('firebase-functions');
// Create and Deploy Your First Cloud Functions
// https://firebase.google.com/docs/functions/write-firebase-functions
exports.helloWorld = functions.https.onRequest((request, response) => {
response.send("Hello from Firebase!");
});