Skip to content

Commit f29b5c2

Browse files
committed
Fix: set TURBOPACK_ROOT in build command to prevent workspace detection issues
1 parent f9ce422 commit f29b5c2

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

jsprojs/webapp/next.config.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ import type { NextConfig } from "next";
22

33
const nextConfig: NextConfig = {
44
/* config options here */
5-
// Explicitly set the root directory to avoid workspace detection issues
6-
// This ensures Next.js uses the correct package.json and node_modules
5+
// Explicitly configure to avoid workspace detection issues
6+
// Next.js was detecting multiple lockfiles and using wrong root
7+
// Note: turbopack.root is set via environment variable or build command
8+
// For now, we rely on Root Directory setting in Vercel
79
};
810

911
export default nextConfig;

jsprojs/webapp/vercel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"framework": "nextjs",
33
"installCommand": "npm ci",
4-
"buildCommand": "npm run build",
4+
"buildCommand": "TURBOPACK_ROOT=. npm run build",
55
"outputDirectory": ".next"
66
}

0 commit comments

Comments
 (0)