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

problem facing in firebase.js #8

Open
fasil-code opened this issue Jan 8, 2022 · 14 comments
Open

problem facing in firebase.js #8

fasil-code opened this issue Jan 8, 2022 · 14 comments

Comments

@fasil-code
Copy link

Compiled with problems:X

ERROR in ./src/firebase.js 3:0-32

Module not found: Error: Package path . is not exported from package C:\Users\acs\Desktop\disney\node_modules\firebase (see exports field in C:\Users\acs\Desktop\disney\node_modules\firebase\package.json)
Did you mean './firebase'?
Requests that should resolve in the current directory need to start with './'.
Requests that start with a name are treated as module requests and resolve within module directories (node_modules, C:\Users\acs\Desktop\disney\node_modules).
If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.

@BlackWatch021
Copy link

Compiled with problems:X

ERROR in ./src/firebase.js 3:0-32

Module not found: Error: Package path . is not exported from package C:\Users\acs\Desktop\disney\node_modules\firebase (see exports field in C:\Users\acs\Desktop\disney\node_modules\firebase\package.json) Did you mean './firebase'? Requests that should resolve in the current directory need to start with './'. Requests that start with a name are treated as module requests and resolve within module directories (node_modules, C:\Users\acs\Desktop\disney\node_modules). If changing the source code is not an option there is also a resolve options called 'preferRelative' which tries to resolve these kind of requests in the current directory too.

Hey, actually the problem is that in the clone older version of firebase is used(which was latest at the time when this clone was made) and you are using the latest version of firebase. In current version the way of importing firebase has been changed.

older

  • import firebase from 'firebase'

current

  • import 'firebase/compat/auth';

and you are gonna need these import too if you stick with the latest version of firebase...

  1. import 'firebase/compat/auth';
  2. import 'firebase/compat/firestore';
  3. import 'firebase/compat/storage';

@fasil-code
Copy link
Author

can u share that firebase file

@BlackWatch021
Copy link

can u share that firebase file

yeah sure, but I am not able to upload the file.......
So do you want me to upload it here in the comment section???

@shashwatbangar
Copy link

Screenshot 2022-02-11 at 11 06 12 PM

Screenshot 2022-02-11 at 11 05 56 PM

I am still getting this error, can somebody help me?
Thanks a lot!

@SehajBindra
Copy link

yeah I am still getting the error can somebody help me guys?

@shashwatbangar
Copy link

yeah I am still getting the error can somebody help me guys?

I resolved it.
Screenshot 2022-02-13 at 12 27 52 AM
Screenshot 2022-02-13 at 12 28 51 AM
Actually firebase changed the way to import its methods. If you even stuck in future, simply google "signInWithPopUp (whatever you want) new version"

@SehajBindra
Copy link

SehajBindra commented Feb 12, 2022 via email

@Maazparker13
Copy link

Hi,
I Tried by looking into the snaps but still the issue comes. I've been trying to resolve this issue can anyone please help me out.

FIREBASE SNIPPETS

@BlackWatch021
Copy link

It's been a while. Since I touched it. @Maazparker13 try importing firebase as a named import rather than a default import.

Instead of default import

  • import firebase from "firebase/compat/auth"

Try named import

  • import { firebase } from 'firebase/compat/auth'

@akshat072
Copy link

can some one help me with this error?
When I click on login button this error Appears.
.
help me with this by sending the correct code to write
header
firebase
Web capture_20-3-2023_18536_localhost
Web capture_20-3-2023_185216_localhost

@yashwanth938
Copy link

for me it's working

@IShubh-10
Copy link

even I'm facing the same can some help with error which is coming after clicking on login button
error is above mentioned by @akshat072

@BlackWatch021
Copy link

@IShubh-10 don't take it personal. But I will suggest you to leave this project. Cause its quite old, a lot has changed since then and is very basic too. In place of this you can try this projectt
You will get to learn a lot of things. There are other tutorials too, so I personally recommend this to you and any one else who is reading this, chose tutorials where latest technology is used plus that's not too old.

Happy coding and
Have a nice day

@IShubh-10
Copy link

thanks buddy

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

8 participants