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

[SDK-812] Next Clerk incompatible with app router + export output #1481

Open
4 of 20 tasks
ozyman42 opened this issue Jul 13, 2023 · 3 comments
Open
4 of 20 tasks

[SDK-812] Next Clerk incompatible with app router + export output #1481

ozyman42 opened this issue Jul 13, 2023 · 3 comments
Assignees
Labels
linear Created by Linear-GitHub Sync Low priority Created by Linear-GitHub Sync

Comments

@ozyman42
Copy link

ozyman42 commented Jul 13, 2023

Package + Version

  • @clerk/clerk-js
  • @clerk/clerk-react
  • @clerk/nextjs 4.21.15
  • @clerk/remix
  • @clerk/types
  • @clerk/themes
  • @clerk/localizations
  • @clerk/clerk-expo
  • @clerk/backend
  • @clerk/clerk-sdk-node
  • @clerk/shared
  • @clerk/fastify
  • @clerk/chrome-extension
  • gatsby-plugin-clerk
  • build/tooling/chore
  • other:

Dependencies + versions

{
  "name": "poc-clerk-next-broken",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "next lint"
  },
  "dependencies": {
    "@clerk/nextjs": "^4.21.15",
    "@types/node": "20.4.2",
    "@types/react": "18.2.14",
    "@types/react-dom": "18.2.7",
    "autoprefixer": "10.4.14",
    "eslint": "8.44.0",
    "eslint-config-next": "13.4.9",
    "next": "13.4.9",
    "postcss": "8.4.25",
    "react": "18.2.0",
    "react-dom": "18.2.0",
    "tailwindcss": "3.3.2",
    "typescript": "5.1.6"
  }
}

Browser/OS

NextJS (browser / node)

Description

When using the Next 13 app router and setting the Next config output to export, then trying to add in the ClerkProvider results in the error

Error: Clerk: auth() and currentUser() are only supported in App Router

image

Demo repo https://github.com/ozyman42/demo-clerk-next-bug
If you comment out line 3 in the next.config.js then the error goes away,

SDK-812

@clerk-cookie
Copy link
Collaborator

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days.

@ozyman42
Copy link
Author

remove "stale" label

@jescalan jescalan added the needs-triage A ticket that needs to be triaged by a team member label Aug 25, 2023
@jescalan jescalan added the linear Created by Linear-GitHub Sync label Oct 16, 2023
@jescalan jescalan changed the title Next Clerk incompatible with app router + export output [SDK-812] Next Clerk incompatible with app router + export output Oct 16, 2023
@jescalan jescalan added the Low priority Created by Linear-GitHub Sync label Oct 16, 2023
@jescalan jescalan removed the needs-triage A ticket that needs to be triaged by a team member label Nov 20, 2023
@Lev1ty
Copy link

Lev1ty commented May 18, 2024

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear Created by Linear-GitHub Sync Low priority Created by Linear-GitHub Sync
Projects
None yet
Development

No branches or pull requests

5 participants