[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Help](/c/help/9)

# Migrating to a monorepo in Vercel

332 views · 1 like · 11 posts


James Singleton (@jamesrsingleton) · 2025-03-12

I am currently working on migrating my repo from just a regular repo to a monorepo with turborepo. Are there any guides/documentation on how to migrate that seamlessly in Vercel?


Swarnava Sengupta (@swarnava) · 2025-03-12

Hello,

The instruction is pretty [straightforward](https://turbo.build/repo/docs/getting-started/add-to-existing-repository) and we have example for https://turbo.build/repo/docs/guides/migrating-from-nx as well. You don't need to worry much about Vercel compatibility as all the Node specific Turborepo apps are automatically compatible with Vercel as long as the framework is natively supported by us.


James Singleton (@jamesrsingleton) · 2025-03-12

So I have already added it. However, my PR builds are now failing due to it not being able to find a version of Next. How do I update my project in Vercel to now handle that?


Swarnava Sengupta (@swarnava) · 2025-03-12

Hello,

Can you check Project Settings> Build & Deployment and make sure **Next.js** is set as framework preset?


James Singleton (@jamesrsingleton) · 2025-03-12

Yup, I have confirmed that. It used to just be a single repo and now I am working on converting it to a monorepo.

![Screenshot 2025-03-12 at 09.35.41|527x500](upload://yVlODO4RyfJeghSi3jmv8iWY2IE.png)


Swarnava Sengupta (@swarnava) · 2025-03-12

You might also need to set `Root Directory` such as `apps/web` or wherever your current project is located and trying to build.


James Singleton (@jamesrsingleton) · 2025-03-12

Ok, but that would potentially mess up the main branch especially if I needed to do a hotfix on the production branch right?


Swarnava Sengupta (@swarnava) · 2025-03-12

You are deploying a monorepo right? Assuming production branch will also be part of `apps/web` directory? for any other directory such as `apps/docs`, you will need to create a different project. This means your `apps/docs` project commit will not build `apps/web` project.


James Singleton (@jamesrsingleton) · 2025-03-12

This is the repo https://github.com/JamesSingleton/redshirt-sports. I am working on it being converted into a monorepo. So I want to test that my preview branch and everything works as expected before I just merge everything and hope for the best.

As for creating another project in Vercel, I know that but I believe everything has to be on the main branch in order for Vercel to recognize it's a turborepo right?


Swarnava Sengupta (@swarnava) · 2025-03-12

I will recommend setting up our Starter template https://vercel.com/new/templates/next.js/turborepo-next-basic. This will give you an idea how you can deploy two separate apps and maintain preview and production branch.


James Singleton (@jamesrsingleton) · 2025-03-12 · ♥ 1

I know how to do it if I am starting from scratch, that's not the issue. My issue is around migrating an existing repo that is already deployed via Vercel to use turborepo in the preview branches.