It works locally but doesn't save to the database when deployed on Vercel.

It's working fine on my local machine, but after deploying to Vercel, it's not saving data to the database.
11 Replies
Vincent Udén
Vincent Udén8mo ago
You really should be getting an error somewhere if your intended data doesnt make it to your database. Have you checked your vercel logs?
Akash Sharma
Akash SharmaOP8mo ago
Yes, I have check vercel logs and I didn't see any error in the logs. also api/uploading status 200 and even when I trying to debug the onUploadComplete function with console.log , i didn't see any log in vercel don't know why it's happening
Vincent Udén
Vincent Udén8mo ago
Could your serverless functions be timing out? If youre on vercel free itjink theyre capped at 10seconds runtime
Akash Sharma
Akash SharmaOP8mo ago
yeah , I'm using vercel free but previously it's working fine and i didn't get any timeout and still now i haven't get any timeout error Any Idea ?
Vincent Udén
Vincent Udén8mo ago
Nope. Without an error message of any kind I have nothing to offer except checking the obvious stuff like making sure env variables are correct
Akash Sharma
Akash SharmaOP8mo ago
Yes Env are correct And also in locally it work fine but not in the deployed one
Vincent Udén
Vincent Udén8mo ago
I am capable of reading. You already said that. Try to add some logging at as many points as you can. See where execution stops
Akash Sharma
Akash SharmaOP8mo ago
Only problem is that it doesn't save in the database file is also upload to the uploadthing no issue on that i have added the logging but i'm unable to see the logs in the vercel
Vincent Udén
Vincent Udén8mo ago
Then you are doing something wrong on your vercel dashboard or its not running at all
Akash Sharma
Akash SharmaOP8mo ago
I have upgrade uploadthing to latest and now i got error in the local DANGEROUSuploadFiles Attempted import error: 'DANGEROUSuploadFiles' is not exported from 'uploadthing/client' (imported as 'DANGEROUS__uploadFiles'). Import trace for requested module: ./node_modules/@uploadthing/react/dist/chunk-36V7DNOE.mjs ./node_modules/@uploadthing/react/dist/hooks.mjs ./src/lib/uploadthing.ts @Vincent any idea how to fix this issue
Vincent Udén
Vincent Udén8mo ago
Nope. I dont use uploadThing
Want results from more Discord servers?
Add your server