Skip to content
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

Named export 'collectionData' not found. The requested module 'rxfire/firestore' is a CommonJS module, which may not support all module.exports as named exports. #59

Open
GiuntaLucas opened this issue Sep 12, 2022 · 1 comment

Comments

@GiuntaLucas
Copy link

Hello, i'm using rxFire into my Astro application using RxFire into one component to retrieve my data from firestore.

During the build i have an issue about the collectionData export wich is not found.
This is the error i get :

image

When i try to apply the fix i have another error, but seems no sence to me.

image

If some of you want to replicate this issue, you can clone this link and run npm run build

I'm using this config:

"dependencies": {
    "@astrojs/svelte": "^1.0.0",
    "astro": "^1.2.1",
    "firebase": "^9.9.4",
    "rxfire": "^6.0.3",
    "rxjs": "^7.5.6",
    "svelte": "^3.50.1"
  }
@elron
Copy link

elron commented Sep 26, 2022

I encounted the same problem using Netlify

Fixed in netlify when added this to netlify.toml:

[functions]
  node_bundler = "esbuild"

Thanks: https://answers.netlify.com/t/lambda-function-es-module-support/30673/16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants