With my little knowledge, Vercel isn’t a platform for backend services, and companies often don’t pick Vercel for their deployments. According to V...
For further actions, you may consider blocking this person and/or reporting abuse
Nice article.
The config you wrote allowed me to pass the problem of the public directory.
However I'm using graphql and I have the following error when browsing the app:
`2023-01-10T17:26:08.853Z baf32391-0925-4f77-b503-ea1ba0c55cee ERROR Cannot find module 'src/common/gql.type'
Require stack:
package.json
? RequestId: baf32391-0925-4f77-b503-ea1ba0c55cee Error: Runtime exited with error: exit status 1 Runtime.ExitError`Any ideas how to solve this? The Vercel documentation mentions some potential issues around case, bug my imports are correct with gql.type and when I look into the source folder that is deployed, the fil is present at the correct location.
Cheers,
Nicolas
Did you find a way of fixing this? I'm getting a similar error
No, I finally used Azure
I fixed it by reverting to relative imports over everything.In your code you had an
like
import {} from src/common.gql.type
. Changing it toimport {} from ../common.gql.type
would probably work.For those having this error,
This Serverless Function has crashed. Your connection is working correctly. Vercel is working correctly. 500: INTERNAL_SERVER_ERROR Code: FUNCTION_INVOCATION_FAILED ID: bom1::sgk4v-1711014022883-1e9ed54f4c37
The workaround I did was to make sure all my imports were not using aliases.
I found out from my vercel logs.
So I changed
src/common
to its actual path. eg.../.../.../common
, and everything worked.It appears vercel is unable to properly handle import aliases, particularly with NestJS. I guess you have to do some extra hacking to make it work, else you have to avoid path aliases.
I wrote this article using Vercel CLI.
todayunboxed.com/deploy-your-nestj...
Anyone can check this out!
Thanks for this post. If you don't mind, can you do one post on how to deploy a NestJS application which is inside an Nx monorepository that already has a NextJS app or ReactJS app.
Hi! Did you find how to do it?
This Serverless Function has crashed. Your connection is working correctly. Vercel is working correctly. 500: INTERNAL_SERVER_ERROR Code: FUNCTION_INVOCATION_FAILED ID: bom1::sgk4v-1711014022883-1e9ed54f4c37
Hey did you find any solution for this?
I had some issues when I deployed my Nest App on Vercel, i made a collection of the issues and wrote it down. Mainly for myself to remember when I need it again for another project, but it might also be helpful for others: nerd-corner.com/lessons-learned-hosting-nestjs-app-on-vercel/
Does anyone know how to deploy socket.io service on vercel?
pls, help me
Any fix to the bug
Thank you! i just want to ask you to put the OPTIONS method on your vercel.json file. if it is not there, the browser cannot make preflight requests, so you cannot make json requests and etc
how to connect to database mr?