hoangvvo / nextjs-mongodb-app

A Next.js and MongoDB web application, designed with simplicity for learning and real-world applicability in mind.
https://nextjs-mongodb.now.sh/
MIT License
1.53k stars 286 forks source link

Error on uploading profile picture when hosted on now #32

Closed dhacquebord closed 4 years ago

dhacquebord commented 4 years ago

Hi,

i've been running into an error which i can't find the root cause of: When i'm running my server on localhost (with either next dev, next start or now dev) everything works as expected. But when i host the server using now i'm encountering an error when uploading a profile picture. The log just outputs Process exited before completing on the function api/user/profilepicture without any further explanation or error message which makes it quite hard to debug. i just checked your example app (https://nextjs-mongodb-app.hoangvvo.now.sh) and this deployment seems to have the same issue. Does anyone have any idea what might be going on?

Thanks in advance.

hoangvvo commented 4 years ago

That's really odd. There might have been some internal changes in the Now platform. I suspect it might have somethings to do with writing data onto disk (when uploading the photo, the photo is saved on the server before being uploaded to Cloudinary)

It used to work before, so I cannot really tell. I will try to investigate it this weekend if possible.