Next.js Discord

Discord Forum

Vercel build failed but code works normally in local machine

Unanswered
Spectacled bear posted this in #help-forum
Open in Discord
Spectacled bearOP
I tried to deploy next app to vercel, but it always fails. My code perfectly works on my pc. Does this have anything to do with eslint?
The error I got:
Type error: Property 'id' does not exist on type 'string'.

If so, how to ignore all of those errors?

4 Replies

Original message was deleted
Spectacled bearOP
What kinda information?🤷‍♂️
That's all I can tell
Roseate Spoonbill
Looks more like type error. Are you reading id off something that comes in as string? What data source are you using? Does the build pass when you run npm run build (or equivalent)? Another thing to look at is whether or not you have all required variables defined in vercel (in case one of them allows you to connect to backend data)
Saltwater Crocodile
it could be a error at dynamic route, you need return a promise