Next.js Discord

Discord Forum

Vercel Module not found error

Unanswered
Sandwich Tern posted this in #help-forum
Open in Discord
Avatar
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

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