Skip to content

App broken with latest v3.0.261029-rc due to "Unknown suffix" errors #4993

Closed

Description

@MickL

Environment

v3.0.261029-rc

Reproduction

Describe the bug

Having file names as described in the docs break the app startup:

middleware/
  1.logger.ts <-- First
  2.auth.ts <-- Second
  3.... <-- Third
[nitro 2:30:43 PM]  ERROR  Unknown suffix .cors in middleware/1.cors.ts. Nitro reserves dotted suffixes in scanned file names; known file extensions (e.g. .json, .md) are kept as-is. Add "cors" to the scanSuffixes config to keep it as part of the name. The file is ignored.

Also I do have other files with . notation that are no routes but throw errors:

Unknown suffix .dto in routes/notion-sdk/dbs/inventar/response.dto.ts. Nitro reserves dotted suffixes in scanned file names; known file extensions (e.g. .json, .md) are kept as-is. Add "dto" to the scanSuffixes config to keep it as part of the name. The file is ignored.

Additional context

No response

Logs

Activity

  1. added
    pending triage
    on Nov 1, 2026
  2. added
    bug
    and removed
    pending triage
    on Nov 1, 2026
  3. pi0x commented on Nov 1, 2026

    @pi0x
    Contributor

    Numbered middleware like middleware/1.cors.ts is fixed in #4995 and will ship in the next release. For routes with other dotted suffixes like routes/.../response.dto.ts, add the suffix to your config with scanSuffixes: ["dto"], so the file is served as /.../response.dto.

    Triaged with AI assistance.

  4. added theissue type on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions