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
You really should be getting an error somewhere if your intended data doesnt make it to your database. Have you checked your vercel logs?
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
Could your serverless functions be timing out? If youre on vercel free itjink theyre capped at 10seconds runtime
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 ?
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
Yes Env are correct
And also in locally it work fine but not in the deployed one
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
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
Then you are doing something wrong on your vercel dashboard or its not running at all
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
Nope. I dont use uploadThing