How to build a nextjs app which is in turbo repo?

Hi folks,

I have been using vercel as my deployment platform for all my web apps in my turbo repo project, but now I would like to migrate to Cloudflare.

Here’s the build command & root dir I use in vercel for building up my website:
build command,

cd ../.. && npx turbo build --scope=www --include-dependencies --no-deps

setting a nextjs app as root directory,

apps/www

Trying the above commands or similar commands in the build cmd field of Cloudflare pages shoots an error saying that it could find workspace:*

I couldn’t find any resources on deploying an app which is turbo repo or any other monorepo in Cloudflare.

I’m aware of proxying Cloudflare with vercel deployments, but that unfortunately creates a redundant process of accessing CDNs, so looking to migrate completely to Cloudflare pages and workers.

5 Likes

Did you find the solution to your problem ? I have the same problem

1 Like