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

Docs: Migrating from Vite error on Step 5: Create the Entrypoint Page #57666

Closed
jlestes opened this issue Oct 28, 2023 · 3 comments
Closed

Docs: Migrating from Vite error on Step 5: Create the Entrypoint Page #57666

jlestes opened this issue Oct 28, 2023 · 3 comments

Comments

@jlestes
Copy link

jlestes commented Oct 28, 2023

What is the improvement or update you wish to see?

I am trying to follow the guide Migrating from Vite with Next v14.0.0. After completing the guide when running npm run dev the migration from Step 5: Create the Entrypoint Page I am getting the error below:

⨯ Error: Page "/[[...slug]]/page" is missing exported function "generateStaticParams()", which is required with "output: export" config.
    at DevServer.renderToResponseWithComponentsImpl (/Users/jlestes/Code/cra-to-next/basic-cra/node_modules/next/dist/server/base-server.js:986:27)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async DevServer.renderPageComponent (/Users/jlestes/Code/cra-to-next/basic-cra/node_modules/next/dist/server/base-server.js:1760:24)
    at async DevServer.renderToResponseImpl (/Users/jlestes/Code/cra-to-next/basic-cra/node_modules/next/dist/server/base-server.js:1798:32)
    at async DevServer.pipeImpl (/Users/jlestes/Code/cra-to-next/basic-cra/node_modules/next/dist/server/base-server.js:851:25)
    at async NextNodeServer.handleCatchallRenderRequest (/Users/jlestes/Code/cra-to-next/basic-cra/node_modules/next/dist/server/next-server.js:266:17)
    at async DevServer.handleRequestImpl (/Users/jlestes/Code/cra-to-next/basic-cra/node_modules/next/dist/server/base-server.js:748:17) {
  page: '/'
}

I have tried reverting to v13.5.6 and I am getting the same error. When going back to v13.4.19 I am no longer getting the error above. I am not sure if this is a bug or the documentation needs updating for v13.5.x and above.

Is there any context that might help us understand?

I am reproducing this with a brand new React app from npm create vite@latest. I'm running this using Node v20.9.0.

Does the docs page already exist? Please link to it.

https://nextjs.org/docs/app/building-your-application/upgrading/from-vite#step-5-create-the-entrypoint-page

@lazaro-contato
Copy link

remove
output: 'export',
from your next config

@jlestes
Copy link
Author

jlestes commented Oct 30, 2023

remove output: 'export', from your next config

@lazaro-contato Thank you for this feedback and help. That does solve this problem but it then relies on a NodeJS server deployment. Which actually happens to be fine in my use case so maybe clearing up the documentation if this is possible or not for a static export. I am starting to think the catch all routes aren't supported in the static export.

https://nextjs.org/docs/app/building-your-application/deploying/static-exports

@samcx samcx removed the Documentation Related to Next.js' official documentation. label Jan 22, 2025
@samcx
Copy link
Member

samcx commented Feb 25, 2025

@samcx samcx closed this as completed Feb 25, 2025
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

No branches or pull requests

3 participants