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

@Yi Lon Ma 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.
@Yi Lon Ma you sure the `convex/_generated` folder is pushed to github?
Sandwich TernOP
Let me check.
@Yi Lon Ma 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
@Yi Lon Ma sure
Sandwich TernOP
alright here is a screenshot of the errors
thanks
I don't see any problem in the code
maybe follow this?
@Yi Lon Ma I don't see any problem in the code
Sandwich TernOP
Thanks, will take a look.