79326696

Date: 2025-01-03 14:22:17
Score: 0.5
Natty:
Report link

I had roughly the same error:

Error: supabaseUrl is required.
    at new pD (.next/server/app/page.js:14:68649)
    at 12869 (.next/server/app/page.js:14:72769)
    at Function.t (.next/server/webpack-runtime.js:1:128)
 ⨯ unhandledRejection:  Error: supabaseUrl is required.
    at new pD (.next/server/app/page.js:14:68649)
    at 12869 (.next/server/app/page.js:14:72769)
    at Function.t (.next/server/webpack-runtime.js:1:128)
 ⨯ Error: supabaseUrl is required.
    at new pD (.next/server/app/page.js:14:68649)
    at 12869 (.next/server/app/page.js:14:72769)
    at Object.t [as require] (.next/server/webpack-runtime.js:1:128)
    at JSON.parse (<anonymous>) {
  digest: '2137665462'
}

I had to update the github actions file with the secrets

name: Run Tests

on:
  pull_request:
    branches: [dev, staging, prod]
    types: [opened, synchronize, reopened]

jobs:
  testing-stuff:
    runs-on: ubuntu-latest

    env:
      NEXTAUTH_SECRET: testing_secret
      NEXTAUTH_URL: http://localhost:3000
      SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
      SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
      NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
      NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.SUPABASE_ANON_KEY }}
      DATABASE_URL: ${{ secrets.DATABASE_URL }}
      REDIS_URL: redis://localhost:6379
      UPSTASH_REDIS_REST_URL: ${{ secrets.UPSTASH_REDIS_REST_URL }}
      UPSTASH_REDIS_REST_TOKEN: ${{ secrets.UPSTASH_REDIS_REST_TOKEN }}

    services:
      redis:
        image: redis
        ports:
          - 6379:6379
        options: >-
          --health-cmd "redis-cli ping"
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5

    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: "22"
          cache: "npm"

      - name: Install dependencies
        run: npm ci

      - name: Run Jest Unit Tests
        run: npm run test

      - name: Run Cypress Tests
        uses: cypress-io/github-action@v6
        with:
          build: npm run build
          start: npm start
          wait-on: "http://localhost:3000"
          record: false
          publish-summary: true
          component: false

Then i had to add the secrets in github secrets enter image description here

Reasons:
  • Probably link only (1):
  • Long answer (-1):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Kaustav Ghosh