-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to run firebase functions locally the ES6 imports are not working #152
Comments
The import for the functions would look like this:
For me that works when I publish the functions but I haven't tried it with the emulators. I rather have a project just for development and test everything there ;) I hope that this can help you. Let me know if you have more issues. |
Check this out. It looks like it works. We just can't use the |
Thanks for providing firebase-function-tools. Can I use the loadFunctions with ES6? Any sample? |
Did you try it with |
Will try again and replace exports with variable. |
@tonprince do you have any updates on this? |
I switched to new cloud functions 2nd gen. |
Hi there! I'm experiencing this issue as well. When trying to deploy the functions on local emulator, the follow error is thrown: ⬢ functions: Failed to load function definition from source: FirebaseError: Failed to load function definition from source: Failed to generate manifest from function source: Error [ERR_REQUIRE_ESM]: require() of ES Module /Users/augustogiavedoni/-----/-----/backend/functions/node_modules/camelcase/index.js from /Users/augustogiavedoni/-----/-----/backend/functions/node_modules/firebase-function-tools/lib/load.js not supported. Seems to me that the problem is that |
Hi, I am using
firebase-function-tools
to write my firebase functions. However I am unable to run firebase functions on emulators locally. Importedimport {functions} from 'firebase-functions'
, functions is undefined. And there are other imports that are not working too. Is there any solutions. Thank you.The text was updated successfully, but these errors were encountered: