I am facing this problem during build after adding "output: 'export'" to next config
Unanswered
CharanReddy404 posted this in #help-forum
I am facing this problem during build after adding "output: 'export'" to next config. can anyone help me out with this
40 Replies
@CharanReddy404 I am facing this problem during build after adding "output: 'export'" to next config. can anyone help me out with this
clerk doesn't work with static export
@Ray clerk doesn't work with static export
not only clerk for all dynamic routes its giving the same error
@CharanReddy404 not only clerk for all dynamic routes its giving the same error
you have to use
generateStaticParams to generate all the path at build time for the dynamic route@Ray you have to use `generateStaticParams` to generate all the path at build time for the dynamic route
is there any way to bypass this because i don't know what params should i use for clerk routes
you can export
generateStaticParams with an empty array returnwhich mean no page is generated for that route
@CharanReddy404 like this ?
what is this page for?
for SignIn using Clerk
it is not gonna work
alternative ?
auth0, aws cognito, firebase auth
nextAuth ?
no
i want convert my next js app in to android and ios app using capacitorjs
@CharanReddy404 i want convert my next js app in to android and ios app using capacitorjs
then you should have an api for authenticate instead
Okay
@CharanReddy404 Okay
but I think clerk should works too
@CharanReddy404 Okay
try change the path to
app/(auth)/sign-in/page.tsxHow ?
ok let me check
if it doesn't work, try this
import { UserButton } from "@clerk/nextjs";
export default function Home() {
return (
<div className="h-screen">
<UserButton afterSignOutUrl="/"/>
</div>
)
}lot of error
i am getting a new error with clerk
UserButton should workSignin may not work@Ray auth0, aws cognito, firebase auth
ok let me try this
oh
UserButton doesn't work too?@CharanReddy404 ok let me try this
https://clerk.com/docs/quickstarts/react
I think you can try this
I think you can try this
⨯ Middleware cannot be used with "output: export". See more info here: https://nextjs.org/docs/advanced-features/static-html-export
@Ray https://clerk.com/docs/quickstarts/react
I think you can try this
try using
@clerk/clerk-react<ClerkProvider publishableKey={node.env.NEXT_PUBLIC_PUBLISHABLE_KEY}>you don't need this
// Import your publishable key
const PUBLISHABLE_KEY = import.meta.env.VITE_CLERK_PUBLISHABLE_KEY
if (!PUBLISHABLE_KEY) {
throw new Error("Missing Publishable Key")
}ok let me explore