-
Notifications
You must be signed in to change notification settings - Fork 57
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
Cannot import firebase-functions/v2
#151
Comments
Thanks for opening up the issue! I spun up a new project but was not able to reproduce this. Do you have a repo I can look at? Thank you again! |
I got this error message as well, when upgrading my project. I was importing |
@ericallam Oh man, I totally forgot about that!! If you're using jest < 28, you'll run into this issue. Please try upgrading to jest@28 and let me know if you can still reproduce this. More info:
I'll open a pr to include jest@28 as a peer dep to reduce this problem. Thank you for raising this! |
This commit adds a peerDep of >=jest@28. jest@28 includes jestjs/jest#11961, which supports `exports` in `package.json`. Without this, jest users that use jest@27 or below will throw an error when firebase-functions-test attempts to import several named exports. Fixes #151
Thank you guys for your help, after I upgraded to jest 28 the problem is gone |
Version info
firebase-functions-test: 2.1.0
firebase-functions: 3.21.2
firebase-admin: 10.2.0
Test case
Steps to reproduce
Expected behavior
No errors
Actual behavior
The text was updated successfully, but these errors were encountered: