diff --git a/.changeset/fix-dashboard-link-punctuation.md b/.changeset/fix-dashboard-link-punctuation.md new file mode 100644 index 00000000000..382b2286084 --- /dev/null +++ b/.changeset/fix-dashboard-link-punctuation.md @@ -0,0 +1,5 @@ +--- +'@clerk/shared': patch +--- + +Reword the missing/invalid key error messages so the Clerk Dashboard URL is no longer immediately followed by a period. Terminals and dev overlays were including the period in the link, producing a broken URL that failed to open the API Keys page. diff --git a/packages/shared/src/errors/errorThrower.ts b/packages/shared/src/errors/errorThrower.ts index 491a8e8c04e..37f6a694a5c 100644 --- a/packages/shared/src/errors/errorThrower.ts +++ b/packages/shared/src/errors/errorThrower.ts @@ -6,21 +6,21 @@ npx clerk@latest init \`npx clerk@latest init\` creates a Clerk application and writes keys to your .env file. No Clerk account or login required and the command is non-interactive. -If you have a Clerk application, run \`npx clerk@latest env pull\` to write the keys (\`--instance prod\` for production keys). Or copy its Publishable key from https://dashboard.clerk.com/last-active?path=api-keys.`, +If you have a Clerk application, run \`npx clerk@latest env pull\` to write the keys (\`--instance prod\` for production keys). Or copy its Publishable key from https://dashboard.clerk.com/last-active?path=api-keys in the Clerk Dashboard.`, MissingPublishableKeyErrorMessage: `Missing publishableKey. To set up Clerk for this project, in your terminal run: npx clerk@latest init \`npx clerk@latest init\` creates a Clerk application and writes keys to your .env file. No Clerk account or login required and the command is non-interactive. -If you have a Clerk application, run \`npx clerk@latest env pull\` to write the keys. Or copy them from https://dashboard.clerk.com/last-active?path=api-keys. Deploy a production instance by running \`npx clerk@latest deploy\`, or \`npx clerk@latest env pull --instance prod\` to use an existing one.`, +If you have a Clerk application, run \`npx clerk@latest env pull\` to write the keys. Or copy them from https://dashboard.clerk.com/last-active?path=api-keys in the Clerk Dashboard. Deploy a production instance by running \`npx clerk@latest deploy\`, or \`npx clerk@latest env pull --instance prod\` to use an existing one.`, MissingSecretKeyErrorMessage: `Missing secretKey. To set up Clerk for this project, in your terminal run: npx clerk@latest init \`npx clerk@latest init\` creates a Clerk application and writes keys to your .env file. No Clerk account or login required and the command is non-interactive. -If you have a Clerk application, run \`npx clerk@latest env pull\` to write the keys. Or copy them from https://dashboard.clerk.com/last-active?path=api-keys. Deploy a production instance by running \`npx clerk@latest deploy\`, or \`npx clerk@latest env pull --instance prod\` to use an existing one.`, +If you have a Clerk application, run \`npx clerk@latest env pull\` to write the keys. Or copy them from https://dashboard.clerk.com/last-active?path=api-keys in the Clerk Dashboard. Deploy a production instance by running \`npx clerk@latest deploy\`, or \`npx clerk@latest env pull --instance prod\` to use an existing one.`, MissingClerkProvider: `{{source}} can only be used within the component. Learn more: https://clerk.com/docs/components/clerk-provider`, }); diff --git a/packages/shared/src/keys.ts b/packages/shared/src/keys.ts index c293a74bcb9..8e6349c037b 100644 --- a/packages/shared/src/keys.ts +++ b/packages/shared/src/keys.ts @@ -104,7 +104,7 @@ npx clerk@latest init \`npx clerk@latest init\` creates a Clerk application and writes keys to your .env file. No Clerk account or login required and the command is non-interactive. -If you have a Clerk application, run \`npx clerk@latest env pull\` to write the keys (\`--instance prod\` for production keys). Or copy them from https://dashboard.clerk.com/last-active?path=api-keys.`; +If you have a Clerk application, run \`npx clerk@latest env pull\` to write the keys (\`--instance prod\` for production keys). Or copy them from https://dashboard.clerk.com/last-active?path=api-keys in the Clerk Dashboard.`; export function parsePublishableKey( key: string | undefined,