PNPM workspace turbo not working

I am trying to host my turbo repo to vercel, but every time I am getting the below error.
Error: The file “/vercel/path0/.next/routes-manifest.json” couldn’t be found. This is often caused by a misconfiguration in your project.
Learn More: vercel/errors/now-next-routes-manifest.md at main · vercel/vercel · GitHub

In my repo I have three folders, 2 are next JS App router projects, and one is a shared utility for supabase and prisma.

I want to host my whole repo to a domain, say xyz.com, where xyz.com will render one next JS project and xyz.com/hosting will render a second project.

I am sharing my turbo.json file, as well as folder structure; please help me. its been 3 days, and I have tried every possible approach.

{
“$schema”: “https://turbo.build/schema.json”,
“globalEnv”: [
“NEXT_PUBLIC_SITE_URL”,
“NEXT_PUBLIC_HOST_URL”,
“NEXT_PUBLIC_GOOGLE_MAPS_API_KEY”,
“NEXT_PUBLIC_SUPABASE_URL”,
“NEXT_PUBLIC_SUPABASE_ANON_KEY”,
“NEXT_PUBLIC_API_URL”,
“NEXT_PUBLIC_CHANNEX_API_BASE”,
“NEXT_PUBLIC_CHANNEX_API_URL”,
“NPM_CONFIG_REGISTRY”
],
“tasks”: {
“build”: {
“dependsOn”: [“^build”],
“outputs”: [“rz-stays-main/.next/", "rz-pms-template/.next/”],
“cache”: false,
“env”: [
“AWS_REGION”,
“AWS_S3_BUCKET_LISTINGS”,
“CLOUDFRONT_URL”,
“AWS_ACCESS_KEY_ID”,
“AWS_SECRET_ACCESS_KEY”,
“CHANNEX_API_PUSH_BOOKING_URL”,
“CHANNEX_OPEN_CHANNEL_API_KEY”,
“CHANNEX_API_KEY”,
“CASHFREE_APP_ID”,
“CASHFREE_SECRET_KEY”,
“CASHFREE_MODE”,
“SUPABASE_SERVICE_ROLE_KEY”,
“OPEN_CHANNEX_API_KEY”
]
},
“dev”: {
“cache”: false,
“persistent”: false,
“env”:
},
“lint”: {
“outputs”:
},
“test”: {
“outputs”:
}
}
}

Hello, We recommend trying out our Next.js and TurboRepo starter kit to understand how to setup the Monorepo: Turborepo & Next.js Starter. You might also need to update Root directory to the actual directory where your application source code located.

Thanks @swarnava , I have my project structure following turbo documentation; can you help me with root directory and build configurations?
Everything is working fine locally with this new setup, but on vercel I am getting same error as before.
{
“$schema”: “https://turbo.build/schema.json”,
“globalEnv”: [
“NEXT_PUBLIC_SITE_URL”,
“NEXT_PUBLIC_HOST_URL”,
“NEXT_PUBLIC_GOOGLE_MAPS_API_KEY”,
“NEXT_PUBLIC_SUPABASE_URL”,
“NEXT_PUBLIC_SUPABASE_ANON_KEY”,
“NEXT_PUBLIC_API_URL”,
“NEXT_PUBLIC_CHANNEX_API_BASE”,
“NEXT_PUBLIC_CHANNEX_API_URL”,
“NPM_CONFIG_REGISTRY”
],
“tasks”: {
“build”: {
“dependsOn”: [“^build”],
“outputs”: [“.next/", "!.next/cache/”],
“cache”: false,
“env”: [
“AWS_REGION”,
“AWS_S3_BUCKET_LISTINGS”,
“CLOUDFRONT_URL”,
“AWS_ACCESS_KEY_ID”,
“AWS_SECRET_ACCESS_KEY”,
“CHANNEX_API_PUSH_BOOKING_URL”,
“CHANNEX_OPEN_CHANNEL_API_KEY”,
“CHANNEX_API_KEY”,
“CASHFREE_APP_ID”,
“CASHFREE_SECRET_KEY”,
“CASHFREE_MODE”,
“SUPABASE_SERVICE_ROLE_KEY”,
“OPEN_CHANNEX_API_KEY”
]
},
“dev”: {
“cache”: false,
“persistent”: true,
“env”:
},
“lint”: {
“outputs”:
},
“test”: {
“outputs”:
}
}
}

FYI, I even tried with default configurations of build and deployment, but still getting same error.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.