Next.js Discord

Discord Forum

Vercel Module not found error

Unanswered
Sandwich Tern posted this in #help-forum
Open in Discord
Sandwich TernOP
Hello everyone,

I have an issue with deploying an app build with Next.js. For some reason I keep getting Module not found: Can't resolve '../../../convex/_generated/api'.
I have no issues when trying to run it locally.
In terms of folder structure, the file that is importing the api is in the "src" folder while the "convex" folder is outside the "src" folder, basically under the root folder. What should I be looking for?
Thanks!

15 Replies

@@ts-ignore You need to run the convex command you used to generate that code locally or push the code to vercel
Sandwich TernOP
What do you mean push the code to vercel? I imported it from github. Also I did add the convex command necessary.
@@ts-ignore you sure the `convex/_generated` folder is pushed to github?
Sandwich TernOP
Let me check.
@@ts-ignore you sure the `convex/_generated` folder is pushed to github?
Sandwich TernOP
Yes, if you are ok with it I can link you the repository. It’s public
sure
and please send the full error you're getting on vercel
@@ts-ignore sure
Sandwich TernOP
alright here is a screenshot of the errors
thanks
I don't see any problem in the code
maybe follow this?
@@ts-ignore I don't see any problem in the code
Sandwich TernOP
Thanks, will take a look.