CleverProgrammers / cp-disney-plus-clone

Here's the DEMO Disney+ Clone App
https://disney-clone-d1e27.web.app
336 stars 260 forks source link

problem facing in firebase.js #8

Open fasil-code opened 2 years ago

fasil-code commented 2 years ago

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 commented 2 years ago

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

current

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 commented 2 years ago

can u share that firebase file

BlackWatch021 commented 2 years ago

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 commented 2 years ago
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 commented 2 years ago

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

shashwatbangar commented 2 years ago

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 commented 2 years ago

Thanks man 👍

On Sun, Feb 13, 2022, 12:31 AM Shashwat Bangar @.***> wrote:

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

I resolved it. [image: Screenshot 2022-02-13 at 12 27 52 AM] https://user-images.githubusercontent.com/62360781/153724545-4e778822-6aeb-4aa5-a93e-f9e2d2421694.png [image: Screenshot 2022-02-13 at 12 28 51 AM] https://user-images.githubusercontent.com/62360781/153724581-c28e99a3-60e6-44b4-b60e-5d282542b569.png Actually firebase changed the way to import its methods. If you even stuck in future, simply google "signInWithPopUp (whatever you want) new version"

— Reply to this email directly, view it on GitHub https://github.com/CleverProgrammers/cp-disney-plus-clone/issues/8#issuecomment-1037396139, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXXQMXKKEVCMCPRLOISR3I3U22U7RANCNFSM5LQWKADQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

Maazparker13 commented 1 year ago

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 commented 1 year ago

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

Try named import

akshat072 commented 1 year ago

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 commented 1 year ago

for me it's working

IShubh-10 commented 1 month ago

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 commented 1 month ago

@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 commented 1 month ago

thanks buddy