-
Notifications
You must be signed in to change notification settings - Fork 360
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
Issue when using the latest firebase version #267
Comments
I'm not familiar with Firebase. Can you give me step by step instructions. I don't know what an 'expo project' is. |
ok I'm sorry, I'll write out the full details to recreate this issue... expo is just a helper to make react-native apps, and firebase is a popular no-sql database hosting service
then clone the repo I just shared with you called testfirebase to start, you run It should show the error... |
I have a hunch it's more of a firebase error... since they had stopped using idb as a dependency, then just recently started using it again and have run into this issue. So I'm not sure which part of the equation has changed. |
Yeah, I think so. Can you file an issue with them and link to it here? |
Here's a link to an existing issue there, where people are suggesting it's a problem with metro recognizing .cjs files. Seems to be an error merry-go-round... If this is the case, the metro is working on a fix, and has a PR already in the works... |
If you want a workaround, you can either downgrade your firebase version for now... or add a cjs reference in your metro.config file @SohelIslamImran |
@crunchytoast Thank you. Create a metro.config.js file in the project root. In the file add the file extension const { getDefaultConfig } = require("@expo/metro-config");
const defaultConfig = getDefaultConfig(__dirname);
defaultConfig.resolver.assetExts.push("cjs");
module.exports = defaultConfig; |
Adding the cjs reference in metro.config.js DID NOT WORK for me. Still receiving the same failed to resolve idb error. I tried all variations of it with sourceExt and still didn't work. |
If adding the cjs reference doesn't work, then just roll back firebase
|
This isn't an idb issue... it's an error in the metro bundler not recognizing cjs files, combined with idb being added as a dependency for the latest firebase version. |
Resolved! Thank you. I keep forgetting that version of Firebase exists.
…On Thu, May 19, 2022, 10:46 AM crunchytoast ***@***.***> wrote:
This isn't an idb issue... it's an error in the metro bundler not
recognizing cjs files, combined with idb being added as a dependency for
the latest firebase version.
—
Reply to this email directly, view it on GitHub
<#267 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AMSPZ5U6HV5YA4ENAYOHJ4LVKZO63ANCNFSM5VQRLKLA>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Just commenting here for folks that may still run into the same issue as I do:
|
ok I'm sorry, I'll write out the full details to recreate this issue...
expo is just a helper to make react-native apps, and firebase is a popular
no-sql database hosting service
npm install --global expo-cli
then clone the repo I just shared with you called testfirebase
to start, you run expo install,
then expo start
It should show the error...
…On Tue, May 10, 2022 at 4:09 PM Jake Archibald ***@***.***> wrote:
I'm not familiar with Firebase. Can you give me step by step instructions.
I don't know what an 'expo project' is.
—
Reply to this email directly, view it on GitHub
<#267 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AQWXFYLVS6TDCHWRELUCSNLVJIKU7ANCNFSM5VQRLKLA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Android Bundling failed 4326ms While trying to resolve module
idbfrom file
D:###\node_modules@firebase\app\dist\esm\index.esm2017.js, the package
D:###\node_modules\idb\package.jsonwas successfully found. However, this package itself specifies a
mainmodule field that could not be resolved (
D:###\node_modules\idb\build\index.cjs. Indeed, none of these files exist:
To reproduce, initialize an expo project, npm install the latest firebase version, and import any module from firebase in the App.js file.
The text was updated successfully, but these errors were encountered: