-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
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
Hydration errors in NextJS User Auth guide #15145
Comments
Thanks for reporting @aleciavogel! I found a related Firebase SDK issue firebase/firebase-js-sdk#7280 which mentions that I agree that an update to the docs is the best short-term solution. Update to install
@aleciavogel would you be interested in opening a small PR for this? |
Certainly! I'll get it done after work tonight. |
- Added a temporary workaround for a console error about the encoding module not being found (this is due to cross-env using node-fetch v2 instead of v3) - Updated the code snippets for the auth-form and account-form to prevent hydration errors Refs supabase#15145
Addressed on the library side. Marking this one as closed. |
Improve documentation
Link
https://supabase.com/docs/guides/getting-started/tutorials/with-nextjs
(Here's a link to the markdown file to edit for your convenience)
Describe the problem
Following the tutorial exactly results in hydration errors where
supabase/auth-helpers-nextjs
is used on the client. This may actually require an improvement in that particular library, but there is a pretty easy workaround in the meanwhile.You also get an error in your terminal if you don't run
npm install encoding
(again, might have to do with a different library that needs improvement, but it's a simple fix).Describe the improvement
Add something about running
npm install encoding
.In
app/auth-form.tsx
:And then follow the same pattern for
app/account/account-form.tsx
.Additional context
Screenshots of the issues after following the tutorial in a fresh project where I'm using the latest version of NextJS (13.4.6)
The text was updated successfully, but these errors were encountered: