-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Docs: When I test under step seven "Fetching data for the dashboard overview page" I get the error "Error: Failed to fetch revenue data." #947
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
Comments
This comment has been minimized.
This comment has been minimized.
import { db } from "@vercel/postgres"; export async function fetchRevenue() { do this for every function and you will be good to go. |
@123filip123 Other than installing Neon DB and grabing the variables to update env.local, what other changes did you make? I had a suspicion that the error I'm getting is due to the DB since there was no Postgres access, only Supabase and I did install Neon per your suggestion, but it's missing other variables too, getting error with Neon: EDIT |
Yes, that's true, since I opened the db in supabase, there were constant disconnections, I should have read it more carefully. |
I was having so many problems with none of my queries working and changing "sql Changing to neon db worked for me as well. I only changed the |
@VitaliJud did you have to visit localhost:3000/seed ? I'm not getting any fetch errors but I'm seeing zero data in my chart edit: lmao gosh darn it - if only I read literally the very next line. My component was still commented |
Thank you for this! I was using Supabase, and this fixed it. |
I'm also following the tutorial and chose Supabase and had the same issue. This fix worked for me too - many thanks! |
What is the documentation issue?
The error comes from the fetchRevenue() function located in the app/lib/data.ts file.
For the solution, I wanted to use the command we used in the database test before.
And with my novice coding knowledge I wrote this and ran the graph but I didn't understand why the library(import { sql } from '@vercel/postgres';
) wasn't working
Is there any context that might help us understand?
I think I'm missing something
Does the docs page already exist? Please link to it.
https://nextjs.org/learn/dashboard-app/fetching-data
The text was updated successfully, but these errors were encountered: