Open hectorlee opened 6 years ago
I can't seem to get any functions to emulate using new firebase-tools, firebase-functions, and firebase-admin. Even firebase-samples default examples fail, so do my previously working functions.
⚠ functions: Failed to emulate helloWorld i functions: No HTTPS functions found. Use firebase functions:shell if you would like to emulate other types of functions.
After 2 days of searching, I still find conflicting info on the status of what versions to use and I can no longer get a simple helloworld app to emulate: Docs say (https://firebase.google.com/docs/functions/manage-functions#set_nodejs_version) you can specify either node 6 or node 8 runtime. Great. I have installed 8. But errors now arise from the emulator which say: Warning: You're using Node.js v8.11.3 but Google Cloud Functions only supports v6.11.5. I figured if I use the recommended Typescript to get all the async/await/es6 goodness shown in these training videos (https://firebase.google.com/docs/functions/video-series/) that it should transpile to es5, which I'd hope would overcome the need for an older node runtime environment. Apparently not the case despite these tutorial videos show he's running node 10 and deploying functions and encouraging us to emulate the functions before deployment. Do his function emulations actually work? If so, what am I doing wrong?
So if I understand, I can use node 8 runtime, but can't use node 8 when emulating functions yet, even when I try a simple helloWorld straight from the firebase examples?
So I guess I have to uninstall all node 8 from my system and go back to 6.11.5? Even though when I install firebase-tools it throws a warning that I need to update to the latest firebase-tools, firebase-functions and firebase-admin? Which of course, starts this whole process over again? When I run npm install in the functions dir of default stock examples it wants me to update to "firebase-admin": "^5.13.1", "firebase-functions": "^2.0.2" which I do, but still emulation doesn't work.
I must have lucked out on my previous app, which went smoothly and had me praising FB. Strangely, I was on Node 8 then and didn't even specify "engines: "8" on that one. It just worked. I'm not an advanced Node or Firebase developer, in fact, trying hard to grok all of it, but this is crazy making right now. Is this all due to the latest updates (which came right in the middle of my current project and broke everything)?
Can someone specify exact versions of node, firebase, firebase-tools, firebase-functions, and firebase-admin I should use to get something done? Do I need firebase SDK too (I think it's not necessary without auth, etc. correct?)
Thanks in advance, J
$ node --version v8.11.3 $ npm --version 6.2.0
⚠ functions: Failed to emulate helloWorld i functions: No HTTPS functions found. Use firebase functions:shell if you would like to emulate other types of functions.
Warning: You're using Node.js v8.11.3 but Google Cloud Functions only supports v6.11.5.
[2018-07-28T18:54:08.421Z] ---------------------------------------------------------------------- [2018-07-28T18:54:08.424Z] Command: /usr/local/bin/node /usr/local/bin/firebase serve --debug [2018-07-28T18:54:08.424Z] CLI Version: 4.0.0 [2018-07-28T18:54:08.424Z] Platform: darwin [2018-07-28T18:54:08.424Z] Node Version: v8.11.3 [2018-07-28T18:54:08.425Z] Time: Sat Jul 28 2018 11:54:08 GMT-0700 (PDT) [2018-07-28T18:54:08.425Z] ----------------------------------------------------------------------
Ping?
Any updates?
I was asked to file this bug here by the mods at the firebase-tools repo.
https://github.com/firebase/firebase-tools/issues/827#issuecomment-406106709
Version info
firebase v3.19.3 node v6.11.5 npm v3.10.10 nvm v0.33.2
firebase-admin 5.12.1 and firebase-functions 1.0.3 and 1.1.0
Platform Information
Mac OS 10.12.6
Steps to reproduce
firebase serve fails to emulate functions even with the example function in index.js.
Expected behavior
Expected to serve functions.
Actual behavior