firebase-tools: 6.9.0
Platform: Linux
works on default project from firebase init functions
same as mentioned in docs, for explantion i'm using firebase functions:shell
i functions: Preparing to emulate functions.
✔ functions: helloWorld
firebase > helloWorld
{ [Function]
get: [Function],
head: [Function],
post: [Function],
put: [Function],
patch: [Function],
del: [Function],
delete: [Function],
cookie: [Function],
jar: [Function],
defaults: [Function] }
✔ functions: Emulator running at http://localhost:5001
firebase > helloWorld
ReferenceError: helloWorld is not defined
this works on 6.8.0 though
new version(6.9.0) does not display url too http://localhost:5000/fresh-con/us-central1/helloWorld
even default port is changed to 5001
@snj33v thanks it looks like we broke something with the new Functions emulator we introduced in 6.9.0. We'll investigate ASAP.
@abehaskins functions:shell has this code block:
_.forEach(emulator.triggers, function(trigger) {
if (_.includes(emulator.emulatedFunctions, trigger.name)) {
var localFunction = new LocalFunction(trigger, emulator.urls, emulator.controller);
var triggerNameDotNotation = trigger.name.replace(/\-/g, ".");
_.set(replServer.context, triggerNameDotNotation, localFunction.call);
}
});
But I don't think the FunctionsEmulator object exposes any of those trigger fields it's looking for.
Investigating now, in the meantime feel free to continue your work with npm install [email protected]
woo, i upgrade firebase-tools and everything is down. got. please fix it.
Same here.
I don't know if it's linked but I also noticed that installing the latest firebase-tools throw an error regarding [email protected] which isn't thrown with [email protected]
If you're using functions:shell please downgrade to 6.8.0 and we will let
you know when we have a fix. Sorry about the disruption!
I am working on a fix in #1260.
I guess this has been fixed with 6.9.1
Sorry but the fix for this issue wasn't ready for 6.9.1, hoping for the
next release.
~As of 6.9.2 this issue has been fixed.~
As of 6.9.2, the shell is able to find exported function but doesn't available inside the shell as before. And need to be invoke using cURL. Also background trigger functions could not be emulate.
This has been fixed in #1260 and will be part of the next release.
Most helpful comment
Investigating now, in the meantime feel free to continue your work with
npm install [email protected]