I have my Node application deployed on Vercel: node-demo-ashen.vercel.app. The problem I am encountering is that on localhost:3000 the images are loading fine, but my images are not loading on Vercel. I have also configured my vercel.json file several times:
{
"version": 2,
"builds": [
{
"src": "server.js",
"use": "@vercel/node"
}
],
"routes": [
{
"src": "/images/(.)",
"dest": "/public/images/$1"
},
{
"src": "/(.)",
"dest": "/server.js"
}
]
}
Help me fix this issue.
I have tried configuring the vercel.json file and also tried logging out and logging in again to resolve the issue, but it seems that it is not working. The images are loading fine on localhost, but on Vercel, images are not loading at all.
2
Answers
I think you might be missing
in your nodejs file. If not do share your nodejs file so that I can help