anti-work / shortest

Have AI write and update tests for you
https://shortest.com
MIT License
187 stars 21 forks source link

There are errors from Clerk while trying to build main branch #67

Closed poudelprakash closed 1 month ago

poudelprakash commented 1 month ago

Complete Log:

labs/shortest - [main] » pnpm run build

> @ build /Users/prakash/2024/labs/shortest
> next build

 ⚠ Configuration with next.config.ts is currently an experimental feature, use with caution.
  ▲ Next.js 15.0.0-canary.152
  - Environments: .env.local, .env
  - Experiments (use with caution):
    · ppr

   Creating an optimized production build ...
 ✓ Compiled successfully
 ✓ Linting and checking validity of types
   Collecting page data  ..Error: Clerk: auth() and currentUser() are only supported in App Router (/app directory).
If you're using /pages, try getAuth() instead.
Original error: Error: `headers` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context
    at s (/Users/prakash/2024/labs/shortest/.next/server/chunks/606.js:1:5951)
    at P (/Users/prakash/2024/labs/shortest/.next/server/chunks/606.js:1:4695)
    at eu (/Users/prakash/2024/labs/shortest/.next/server/app/api/github/webhook/route.js:2:77011)
    at 29446 (/Users/prakash/2024/labs/shortest/.next/server/app/api/github/webhook/route.js:5:2224)
    at t (/Users/prakash/2024/labs/shortest/.next/server/webpack-runtime.js:1:128)
    at t (/Users/prakash/2024/labs/shortest/.next/server/app/api/github/webhook/route.js:5:49130)
    at /Users/prakash/2024/labs/shortest/.next/server/app/api/github/webhook/route.js:5:49165
    at t.X (/Users/prakash/2024/labs/shortest/.next/server/webpack-runtime.js:1:2135)
    at /Users/prakash/2024/labs/shortest/.next/server/app/api/github/webhook/route.js:5:49143
    at Object.<anonymous> (/Users/prakash/2024/labs/shortest/.next/server/app/api/github/webhook/route.js:5:49193)
 ✓ Collecting page data
   Generating static pages (0/12)  [=   ]Error: Clerk: auth() and currentUser() are only supported in App Router (/app directory).
If you're using /pages, try getAuth() instead.
Original error: Error: `headers` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context
    at s (/Users/prakash/2024/labs/shortest/.next/server/chunks/606.js:1:5951)
    at P (/Users/prakash/2024/labs/shortest/.next/server/chunks/606.js:1:4695)
    at eu (/Users/prakash/2024/labs/shortest/.next/server/app/api/github/webhook/route.js:2:77011)
    at 29446 (/Users/prakash/2024/labs/shortest/.next/server/app/api/github/webhook/route.js:5:2224)
    at t (/Users/prakash/2024/labs/shortest/.next/server/webpack-runtime.js:1:128)
    at t (/Users/prakash/2024/labs/shortest/.next/server/app/api/github/webhook/route.js:5:49130)
    at /Users/prakash/2024/labs/shortest/.next/server/app/api/github/webhook/route.js:5:49165
    at t.X (/Users/prakash/2024/labs/shortest/.next/server/webpack-runtime.js:1:2135)
    at /Users/prakash/2024/labs/shortest/.next/server/app/api/github/webhook/route.js:5:49143
    at Object.<anonymous> (/Users/prakash/2024/labs/shortest/.next/server/app/api/github/webhook/route.js:5:49193)
 ✓ Generating static pages (12/12)
 ✓ Collecting build traces
 ✓ Finalizing page optimization

Route (app)                              Size     First Load JS
┌ ƒ /                                    203 B           130 kB
├ ○ /_not-found                          139 B          97.5 kB
├ ƒ /api/generate-tests                  0 B                0 B
├ ƒ /api/github/webhook                  0 B                0 B
├ ƒ /api/stripe/checkout                 0 B                0 B
├ ƒ /api/stripe/webhook                  0 B                0 B
├ ƒ /dashboard                           54.6 kB         174 kB
├ ƒ /dashboard/settings                  139 B          97.5 kB
├ ○ /icon                                0 B                0 B
└ ƒ /pricing                             1.59 kB         112 kB
+ First Load JS shared by all            97.3 kB
  ├ chunks/14f89942-372f23c700ac6cb8.js  52.7 kB
  ├ chunks/407-a45906f140ed17ec.js       42.7 kB
  └ other shared chunks (total)          1.94 kB

ƒ Middleware                             62.5 kB

○  (Static)   prerendered as static content
ƒ  (Dynamic)  server-rendered on demand