Bug Description
The standalone Fumadocs application under packages/docs no longer builds on current main (9d16e682). Its Turbopack project includes the repository-root middleware.ts, then resolves that file's root alias relative to packages/docs:
Module not found: Can't resolve '@/lib/config/feature-flags'
Import map: aliased to relative './lib/config/feature-flags' inside of [project]/packages/docs
Reproduction
cd packages/docs
pnpm install --frozen-lockfile --ignore-workspace
pnpm build
The MDX generation step succeeds, but next build fails while compiling ./middleware.ts from the repository root.
Root Cause and Regression Window
packages/docs is a separate Next.js app with its own lockfile, tsconfig, alias, and GitHub workflow.
- Its
next.config.mjs does not explicitly bound the Turbopack root to the docs package.
- Commit
04621578 (OpenMAIC v1.0.0, August 27) added @/lib/config/feature-flags to the repository-root middleware.
- The most recent Docs Build workflow ran successfully on August 13, before that import was added.
- The docs workflow path filter does not include the root middleware, so the v1.0 change did not run the standalone docs build on main.
Before the new root-only import, accidentally compiling the root middleware did not expose the project-boundary leak. It now does.
Expected Behavior
The packages/docs build should be isolated to the docs application and should not discover or compile the product application's root middleware.
Proposed Scope
Set the docs app's Turbopack root explicitly to the packages/docs directory in packages/docs/next.config.mjs. Do not copy product feature flags into the docs app or weaken the root middleware alias.
Acceptance Criteria
pnpm build succeeds from packages/docs on Node 22 with its standalone lockfile.
- The static export and all configured locale routes are generated.
pnpm types:check remains green.
- The root OpenMAIC build/configuration is unchanged.
- A future docs PR triggers and passes the existing Docs Build workflow.
This report and proposed fix are AI-assisted and were manually reproduced on current main.
Bug Description
The standalone Fumadocs application under
packages/docsno longer builds on currentmain(9d16e682). Its Turbopack project includes the repository-rootmiddleware.ts, then resolves that file's root alias relative topackages/docs:Reproduction
cd packages/docs pnpm install --frozen-lockfile --ignore-workspace pnpm buildThe MDX generation step succeeds, but
next buildfails while compiling./middleware.tsfrom the repository root.Root Cause and Regression Window
packages/docsis a separate Next.js app with its own lockfile, tsconfig, alias, and GitHub workflow.next.config.mjsdoes not explicitly bound the Turbopack root to the docs package.04621578(OpenMAIC v1.0.0, August 27) added@/lib/config/feature-flagsto the repository-root middleware.Before the new root-only import, accidentally compiling the root middleware did not expose the project-boundary leak. It now does.
Expected Behavior
The
packages/docsbuild should be isolated to the docs application and should not discover or compile the product application's root middleware.Proposed Scope
Set the docs app's Turbopack root explicitly to the
packages/docsdirectory inpackages/docs/next.config.mjs. Do not copy product feature flags into the docs app or weaken the root middleware alias.Acceptance Criteria
pnpm buildsucceeds frompackages/docson Node 22 with its standalone lockfile.pnpm types:checkremains green.This report and proposed fix are AI-assisted and were manually reproduced on current main.