-
Notifications
You must be signed in to change notification settings - Fork 490
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure there is monorepo .vercel/output
#1770
Comments
I can't figure out how to deploy my I have I have tried many of the While this issue is open, is there any advice on the correct custom |
Sadly yes the problem exsits. If you have only one vercel deployment for monorepo, you can make a link with |
@danielroe do you remember the reason btw? :D |
IIRC, it was because Vercel allow users to pick a subdirectory, and in this case they look for build output within that subdirectory rather than at workspace root. I wonder if they expose this information at build time in an environment variable? (Or maybe they would be willing to do so?) |
I bet there is already one! Thanks for sharing your thoughts @danielroe ❤️ |
I've got an update on this. Turns out Nuxt / Nitro has no issue with monorepo based on pnpm workspaces. Important setting: The root directory should point to the Nuxt app. (Vercel auto-detected that and prefilled the path to the Nuxt app!) The fact that is works when you specify a root directory is actually mentioned in the first comment of this issue. And I think this is fine. I tried the symlinking and could not get it to work. So there might not be a solution to this issue, when not specifying the the correct root dir that is. Also, what if you have 2 Nuxt app in the mono repo, which one will you simlink to the root? There is a working solution, I would suggest that this issue can be closed, maybe with some extra documentation (I will send PR). In the build log you can see the dependency pointing to the right folder. Some more details: After cloning https://github.com/serkodev/nuxt-monorepo and successfully deploying to Vercel that I started to investigate. Although my local setup worked fine, using a Nuxt app and a TS lib (using
I used |
When Niro builds are from a monorepo subdirectory (as root) like
/project/docs/
, we do generate/project/docs/.vercel/output
but unless Vercel using configured sub-directory as root, tries output config from/project/.vercel/output
.In the past, we have tried to detect monorepo/workspace root and change defaults but it then introduced more edge cases. (references missing)
As an alternative and lighter workaround to this, we might try to create a symbolic link from
/project/docs/.vercel/output
to/project/.vercel/output
to try to automatically resolve this problem.The text was updated successfully, but these errors were encountered: