Skip to content
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

PageNotFoundError: Cannot find module for page: / #55815

Closed
1 task done
supercoolx opened this issue Sep 22, 2023 · 1 comment
Closed
1 task done

PageNotFoundError: Cannot find module for page: / #55815

supercoolx opened this issue Sep 22, 2023 · 1 comment
Labels
bug Issue was opened via the bug report template.

Comments

@supercoolx
Copy link

Link to the code that reproduces this issue

https://github.com/supercoolx/REX-Protocol/actions/runs/6273810642/job/17038178995

To Reproduce

I want to export next app.
But the export command give me errors.

info  - using build directory: E:\works\rex\flowbite-next-starter\.next
info  - Copying "static build" directory
info  - No "exportPathMap" found in "E:\works\rex\flowbite-next-starter\next.config.js". Generating map from "./pages"
info  - Launching 7 workers
info  - Copying "public" directory
info  - Exporting (2/2)
PageNotFoundError: Cannot find module for page: /
    at Object.getPagePath (E:\works\rex\flowbite-next-starter\node_modules\next\dist\server\require.js:77:15)
    at E:\works\rex\flowbite-next-starter\node_modules\next\dist\export\index.js:375:48
    at Array.map (<anonymous>)
    at E:\works\rex\flowbite-next-starter\node_modules\next\dist\export\index.js:366:69
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Span.traceAsyncFn (E:\works\rex\flowbite-next-starter\node_modules\next\dist\trace\trace.js:79:20) {
  code: 'ENOENT'
}

How can I fix this issue?

Current vs. Expected behavior

I don't know how to fix this issue.

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Node.js version: 18.16.1
Next.js version: 13.0.6
OS: Windows 10

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

App Router

Additional context

Project structure
image

@supercoolx supercoolx added the bug Issue was opened via the bug report template. label Sep 22, 2023
@FerrariAndrea
Copy link

Your repository is not accessible, we can't read it, it is a 404, maybe is private.
Anyway, it is really strange that your build command is looking for './pages' meanwhile you have an './app' structure, try to check your next.js version.

Read the documentation looking for the differences between the 'pages' and 'app' versions:
https://nextjs.org/docs
(in the left corner you can switch between them)

Last stuff, did you try with 'next build' or 'next dev' instead of 'next export'?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template.
Projects
None yet
Development

No branches or pull requests

2 participants