clerk-nextjs-pages-quickstart icon indicating copy to clipboard operation
clerk-nextjs-pages-quickstart copied to clipboard

Clerk publishable token is not being parsed correctly

Open andylamp opened this issue 6 months ago • 1 comments

Hello,

Thanks for the example, however I fail to successfully run the project using the instructions provided. I am using an Ubuntu distro (22.04) with Nodejs v18.19.x and by doing the following,

  • cloning the repository
  • adding a .env.local in the root folder with the required variables as fetched from Clerk's dashboard, and finally doing,
  • npm install && npm run dev

I get the following error:

➜  clerk-nextjs-pages-quickstart git:(main) ✗ npm install

up to date, audited 393 packages in 994ms

119 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
➜  clerk-nextjs-pages-quickstart git:(main) ✗ npm run dev

> [email protected] dev
> next dev

   ▲ Next.js 14.0.4
   - Local:        http://localhost:3000
   - Environments: .env.local

 ✓ Ready in 2.7s
 ✓ Compiled /src/middleware in 428ms (281 modules)
 ⨯ node_modules/@clerk/shared/dist/chunk-5DRMPUGE.mjs (175:12) @ Object.throwMissingPublishableKeyError
 ⨯ @clerk/backend: Missing publishableKey. You can get your key at https://dashboard.clerk.com/last-active?path=api-keys.
null
 ○ Compiling /_error ...

Obviously, I cannot provide the keys that I've put in my .env.local but they were pasted as-is from the dashboard. What am I doing wrong?

andylamp avatar Dec 14 '23 18:12 andylamp