Skip to content

Incorrect implementation of detecting pages folder  #1774

Closed
@himself65

Description

@himself65

I read the code and found that: baseDir = appDir, and appDir comes from required-server-files.json, which is the directory of the nextjs application.
But what if I put all the pages and apis into ${baseDir}/src/pages?

In my case, this will cause the building API handlers to be undefined because of the last filter.

https://github.com/netlify/next-runtime/blob/e67c3d2b0bdb013fa7b7e270cc71d3d89c50a5cd/packages/runtime/src/helpers/functions.ts#L177

https://github.com/netlify/next-runtime/blob/e67c3d2b0bdb013fa7b7e270cc71d3d89c50a5cd/packages/runtime/src/helpers/functions.ts#L194

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions