Skip to content

Incorrect implementation of detecting pages folder #1774

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
himself65 opened this issue Nov 15, 2022 · 1 comment · Fixed by #1778
Closed

Incorrect implementation of detecting pages folder #1774

himself65 opened this issue Nov 15, 2022 · 1 comment · Fixed by #1778

Comments

@himself65
Copy link

himself65 commented Nov 15, 2022

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

@himself65
Copy link
Author

himself65 added a commit to himself65/next-runtime that referenced this issue Nov 15, 2022
@kodiakhq kodiakhq bot closed this as completed in #1778 Dec 2, 2022
kodiakhq bot pushed a commit that referenced this issue Dec 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant