Skip to content

output: 'export' does not create _next/data folders but static site still looks for data json files when middleware.ts is present #61343

@pr1ntr

Description

@pr1ntr

Link to the code that reproduces this issue

https://github.com/pr1ntr/next-json-bug-repro

To Reproduce

npm run build
npx serve out/

Current vs. Expected behavior

current behavior is tries to fetch _next/data//about.json from the

Expected behavior is that it wont try to fetch _next/data//about.json

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
Binaries:
  Node: 18.18.0
  npm: N/A
  Yarn: N/A
  pnpm: 7.26.2
Relevant Packages:
  next: 14.1.0
  eslint-config-next: 14.1.0
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.3.3
Next.js Config:
  output: export

Which area(s) are affected? (Select all that apply)

Middleware / Edge (API routes, runtime), Static HTML Export (output: "export")

Which stage(s) are affected? (Select all that apply)

next build (local), Other (Deployed)

Additional context

I tested this in 14.0.4 and 14.1, another person tested canary with similar results.

Metadata

Metadata

Assignees

No one assigned

    Labels

    RuntimeRelated to Node.js or Edge Runtime with Next.js.bugIssue was opened via the bug report template.staleThe issue has not seen recent activity.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions