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

Failed to resolve entry for package "firebase". Missing "." export in "firebase" package. #5708

Closed
7 tasks done
rob-digital opened this issue Nov 16, 2021 · 2 comments
Closed
7 tasks done

Comments

@rob-digital
Copy link

rob-digital commented Nov 16, 2021

Describe the bug

Hi.
Could anybody advice how to fix this issue please? My Vite app doesn't accept this import:
import firebase from 'firebase'
and throws this error:
[plugin:vite:import-analysis] Failed to resolve entry for package "firebase". The package may have incorrect main/module/exports specified in its package.json: Missing "." export in "firebase" package

I've tried these imports:
import firebase from "@firebase/app";
import * as firebase from "@firebase/app";
import firebase from 'firebase/app';
import "firebase/firestore";
import "firebase/auth";
and no luck.

import firebase from "@firebase/app does not display the above error but complains about auth()

Thanks a lot.

Reproduction

https://github.com/rob-digital/web-dashboard-withVite

System Info

System:
    OS: Windows 10 10.0.19043
    CPU: (12) x64 Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
    Memory: 2.31 GB / 15.96 GB
  npmPackages:
    @vitejs/plugin-vue: ^1.9.3 => 1.9.4
    autoprefixer: ^10.4.0 => 10.4.0
    axios: ^0.24.0 => 0.24.0
    firebase: ^9.4.1 => 9.4.1
    firebase-admin: ^10.0.0 => 10.0.0
    postcss: ^8.3.11 => 8.3.11
    tailwindcss: ^2.2.19 => 2.2.19
    vite: ^2.6.4 => 2.6.14
    vue: ^3.2.16 => 3.2.21
    vue-router: ^4.0.12 => 4.0.12
    vuex: ^4.0.2 => 4.0.2

Used Package Manager

npm

Logs

No response

Validations

@benmccann
Copy link
Collaborator

duplicate of #4425

this should be fixed with the latest firebase and Vite 2.7.0 (currently in beta)

@rob-digital
Copy link
Author

Cheers mate!

@github-actions github-actions bot locked and limited conversation to collaborators Dec 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants