Closed raajnadar closed 1 year ago
@raajnadar Here's suggested implementation for Firebase by Next.js team - https://github.com/vercel/next.js/tree/canary/examples/with-firebase-authentication
That suggested implementation has been removed and instead points to this package, which adds in a lot of features if you need clientside and serverside auth support.
If you're using Next.js for firebase hosting and are just going to output static files, though, they advise you not use it because it's overkill...
So I just undertook rewriting the FirebaseAuth file so that anyone in the future who is trying to do this and finds this issue can drop this version of the component into their Next.js project instead:
If you import like this, error occured
import { StyledFirebaseAuth } from 'react-firebaseui'
You should write as
import StyledFirebaseAuth from 'react-firebaseui/StyledFirebaseAuth'
import StyledFirebaseAuth from 'react-firebaseui/StyledFirebaseAuth'
Why does this work?
When we use this library with the latest version of Next.Js this error is thrown.
https://github.com/zeit/next.js/blob/master/errors/css-npm.md
Can we get a quick fix for this issue??