Next.js Discord

Discord Forum

Error [TurbopackInternalError]: Failed to write app endpoint /_not-found/page

Unanswered
adam.birds posted this in #help-forum
Open in Discord
Any ideas what could be causing this error? The only not found page I have is app/not-found.tsx and that looks fine. NextJs 16

workspace/documentation on  passkey-support via :snake: v3.12.3 (venv) took 12s #  NODE_ENV=production pnpm run build

> documentation@0.1.0 build /workspace/documentation
> next build

   ▲ Next.js 16.0.7 (Turbopack)
   - Environments: .env.local

   Creating an optimized production build ...

-----
FATAL: An unexpected Turbopack error occurred. A panic log has been written to /tmp/next-panic-c7a6086389b4b7b7fdf8ce58a93a9e82.log.

To help make Turbopack better, report this error by clicking here.
-----


> Build error occurred

Error [TurbopackInternalError]: Failed to write app endpoint /_not-found/page

Caused by:
- Expected process result to be a module, but it could not be processed

Debug info:
- Execution of get_all_written_entrypoints_with_issues_operation failed
- Execution of EntrypointsOperation::new failed
- Execution of all_entrypoints_write_to_disk_operation failed
- Execution of Project::emit_all_output_assets failed
- Execution of *emit_assets failed
- Execution of all_assets_from_entries_operation failed
- Execution of *all_assets_from_entries failed
- Execution of output_assets_operation failed
- Execution of <AppEndpoint as Endpoint>::output failed
- Failed to write app endpoint /_not-found/page
- Execution of AppEndpoint::output failed
- Execution of whole_app_module_graph_operation failed
- Execution of *ModuleGraph::from_single_graph failed
- Execution of *SingleModuleGraph::new_with_entries failed
- Execution of Project::get_all_entries failed
- Execution of <AppEndpoint as Endpoint>::entries failed
- Execution of get_app_page_entry failed
- Execution of ProcessResult::module failed
- Expected process result to be a module, but it could not be processed
    at <unknown> (TurbopackInternalError: Failed to write app endpoint /_not-found/page) {
  type: 'TurbopackInternalError',
  location: undefined
}
 ELIFECYCLE  Command failed with exit code 1.

3 Replies

Only happens after switching toNextJS 16. Using markdoc if that matters.
@adam.birds Only happens after switching toNextJS 16. Using markdoc if that matters.
Huntaway
Can you share the not found file by chance ?
@Huntaway Can you share the not found file by chance ?
import Link from 'next/link'

export default function NotFound() {
  return (
    <div className="max-w-2xl min-w-0 flex-auto px-4 py-16 lg:max-w-none lg:pr-0 lg:pl-8 xl:px-16">
      <div className="flex h-full flex-col items-center justify-center text-center">
        <p className="font-display text-sm font-medium text-slate-900 dark:text-white">
          404
        </p>
        <h1 className="mt-3 font-display text-3xl tracking-tight text-slate-900 dark:text-white">
          Page not found
        </h1>
        <p className="mt-2 text-sm text-slate-500 dark:text-slate-400">
          Sorry, we couldn’t find the page you’re looking for.
        </p>
        <Link
          href="/"
          className="mt-8 text-sm font-medium text-slate-900 dark:text-white"
        >
          Go back home
        </Link>
      </div>
    </div>
  )
}