import type { NextConfig } from "next"; import path from "path"; // Pin Turbopack's workspace root to this dashboard directory. When the // plugin is installed via npx (e.g. ~/.npm/_npx//node_modules/...), // Next would otherwise detect the npx parent's package-lock.json as the // workspace root and panic in `next build` ("Failed to write app endpoint // /page"). Pinning the root avoids that misdetection. const nextConfig: NextConfig = { turbopack: { root: path.resolve(__dirname), }, }; export default nextConfig;