Skip to content

[BUG] The build process requires a custom not-found page to be defined #167

@dario-piotrowicz

Description

@dario-piotrowicz

Describe the bug

I have a very minimalistic Next.js 14 app with only an api route, when trying to build my application using the adapter the build process fails with the following error unless I provide a custom not-found page:
Screenshot 2024-12-12 at 13 13 45

Steps to reproduce

Expected behavior

I don't think a custom not-found page should be mandatory

@opennextjs/cloudflare version

https://pkg.pr.new/@opennextjs/cloudflare@experimental

Node.js version

20.11.0

Wrangler version

3

next info output

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:15 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6000
  Available memory (MB): 32768
  Available CPU cores: 10
Binaries:
  Node: 20.11.0
  npm: 10.2.4
  Yarn: 1.22.19
  pnpm: 9.12.1
Relevant Packages:
  next: 14.2.6 // An outdated version detected (latest is 15.1.0), upgrade is highly recommended!
  eslint-config-next: N/A
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.7.2
Next.js Config:
  output: N/A

Additional context

Not too important, but when forced to create a custom not-found page I then also need to have a root layout (https://github.com/dario-piotrowicz/next-14-hello-world-app/blob/open-next/app/layout.tsx), meaning that I actually need to add two unnecessary files to my app

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions