Next.js Discord

Discord Forum

can't get export command to work

Unanswered
Brown bear posted this in #help-forum
Open in Discord
Brown bearOP
Trying this from morning cant get it to work, tried changing
dynamic = "force-dynamic" to auto but still get other error like prerender error

28 Replies

in your page.tsx where u want the route to be fully dynamic
Brown bearOP
So should not use in route.tsx
@Brown bear So should not use in route.tsx
there is no route.tsx
in the app router u have page.tsx, layout.tsx and route.tsx for route handlers
any other file is a rsc component by default
"use server" for server actions, "use client" for client components
Brown bearOP
I have a file called route.tsx in api folder getting error over there
api folder is in app/ right?
Brown bearOP
Ya
can u show me a screenshot
of your build output
Brown bearOP
ah i see
remove "output: "export" from your next config
Brown bearOP
I want to export to out folder
@Brown bear I want to export to out folder
dynamic features arent supported with static exports
Brown bearOP
Ya even got that error called prerender error
yes and exporting dynamic will fix your prerender error
but since u exporting u cant do that
Brown bearOP
Is there any way around
To get things done
uhm
nope
Brown bearOP