You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi;
There seems a bug happening on while deploying convex on either locally or when trying to deploy on vercel.
The documentation suggest using custom build command which is npx convex deploy --cmd 'npm run build'
However, this command fails generating convex/_generated folder before nextjs try to build whole app. Therefore, it results in 'module not found' errors on the files that imports modules from this folder.
I found a solution. If we ignore --cmd option and update the custom build command like below: npx convex deploy && npm run build
It waits convex to deploy and generate related folder and files, then run next build.
Can you provide repro steps? Like what is an example app (ideally one of the Convex demo apps) and add screenshots / exact information from the errors you are seeing.
The issue is probably the docs saying npm convex deploy --cmd 'npm run build' but you can see in the screenshot that it actually is npm convex deploy --cmd='npm run build' with = after --cmd. I guess this is the issue because I'm using = for my project and have no issue deploying.
Hi;
There seems a bug happening on while deploying convex on either locally or when trying to deploy on vercel.
The documentation suggest using custom build command which is
npx convex deploy --cmd 'npm run build'
However, this command fails generating
convex/_generated
folder before nextjs try to build whole app. Therefore, it results in 'module not found' errors on the files that imports modules from this folder.I found a solution. If we ignore --cmd option and update the custom build command like below:
npx convex deploy && npm run build
It waits convex to deploy and generate related folder and files, then run next build.
My suggestion is updating documentation which is here: https://docs.convex.dev/production/hosting/vercel
The text was updated successfully, but these errors were encountered: