问题
I've been trying all day to get my functions to run locally but I don't know why it keeps saying I have no functions. I'm using typescript, so I ran tsc
in the functions folder, then ran sudo firebase serve --only functions
, but I get this error:
i functions: No HTTPS functions found.
Use firebase functions:shell if you would like to emulate other types of functions.
Edit: I tried serving the function without sudo
but I get permission issues:
回答1:
Make sure you have nothing running on the same port that the Firebase function emulator is trying to run on, in my case I had a Docker container running on port 5000. Once I stopped it and started the Firebase function emulator it served the function correctly.
回答2:
Ok, I don't know why it worked, but I just restarted VSCode (because it had an update) and everything works now.
来源:https://stackoverflow.com/questions/53329108/no-https-functions-found-use-firebase-functionsshell