1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ClerkでOrganizationProfileを使用したら出たエラーとその解決方法

Posted at

エラー内容

Error: 
Clerk: The <OrganizationProfile/> component is not configured correctly. The most likely reasons for this error are:

1. The "/organization/org_2kakdkCNc04Ds5H3vyWcrChCr63/settings" route is not a catch-all route.
It is recommended to convert this route to a catch-all route, eg: "/organization/org_2kakdkCNc04Ds5H3vyWcrChCr63/settings/[[...rest]]/page.tsx". Alternatively, you can update the <OrganizationProfile/> component to use hash-based routing by setting the "routing" prop to "hash".

2. The <OrganizationProfile/> component is mounted in a catch-all route, but all routes under "/organization/org_2kakdkCNc04Ds5H3vyWcrChCr63/settings" are protected by the middleware.
To resolve this, ensure that the middleware does not protect the catch-all route or any of its children. If you are using the "createRouteMatcher" helper, consider adding "(.*)" to the end of the route pattern, eg: "/organization/org_2kakdkCNc04Ds5H3vyWcrChCr63/settings(.*)". For more information, see: https://clerk.com/docs/references/nextjs/clerk-middleware#create-route-matcher

原因

Catch-allルートが設定されていないのが原因らしい。

やったこと

[[...rest]]フォルダを作成し、その配下にエラーが出てるファイルを移動させた。
setteing/[[...rest]]/page.tsx
image.png

結果

エラーが解消され、メンバー情報が見れるようになった
image.png

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?