Skip to content

TypeError: Invalid base URL #8

Description

Steps to reproduce:

  • Node 19.5, Windows 11 pnpm version: 8.5.1
  • SSL connection fix: appended ssl={"rejectUnauthorized":true}' to DB_URL
  • Execute db:push: tables created successfully
  • Execute pnpm dev
  • Error message in terminal:

t3-app-router-edge-drizzle@0.1.0 dev D:\nextjs\t3-app-router-edge-drizzle
next dev

  • ready started server on 0.0.0.0:3000, url: http://localhost:3000

  • info Loaded env from D:\nextjs\t3-app-router-edge-drizzle.env

  • warn You have enabled experimental feature (typedRoutes) in next.config.js.

  • warn Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.

  • event compiled client and server successfully in 773 ms (311 modules)

  • wait compiling...

  • event compiled client and server successfully in 197 ms (311 modules)

  • wait compiling /page (client and server)...

  • event compiled client and server successfully in 9.4s (3685 modules)
    [TRPCError: Invalid base URL: https://] {
    code: 'INTERNAL_SERVER_ERROR',
    name: 'TRPCError'
    }

  • error TypeError: Invalid base URL: https://
    at new URLImpl (evalmachine.:2825:19)
    at exports.setup (evalmachine.:3037:16)
    at new URL (evalmachine.:3091:26)
    at Generator.next ()
    at new Promise ()

  • error TypeError: Invalid base URL: https://
    at new URLImpl (evalmachine.:2825:19)
    at exports.setup (evalmachine.:3037:16)
    at new URL (evalmachine.:3091:26)
    at Generator.next ()
    at new Promise ()
    digest: "3593854675"


Steps done to try resolve:


  • upgraded to Next 13.4.1

  • run pnpm dev again

  • got cleaner error message:

  • ready started server on 0.0.0.0:3000, url: http://localhost:3000

  • info Loaded env from D:\nextjs\t3-app-router-edge-drizzle.env

  • warn You have enabled experimental feature (typedRoutes) in next.config.js.

  • warn Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.

  • event compiled client and server successfully in 802 ms (306 modules)

  • wait compiling...

  • event compiled client and server successfully in 239 ms (306 modules)

  • wait compiling /page (client and server)...

  • event compiled client and server successfully in 10.2s (3688 modules)

  • wait compiling...

  • event compiled successfully in 3.9s (1729 modules)
    [TRPCError: Invalid base URL: https://] {
    code: 'INTERNAL_SERVER_ERROR',
    name: 'TRPCError'
    }

  • error TypeError: Invalid base URL: https://
    at new URLImpl (evalmachine.:2825:19)
    at exports.setup (evalmachine.:3037:16)
    at new URL (evalmachine.:3091:26)
    at Generator.next ()
    at new Promise ()

  • error TypeError: Invalid base URL: https://
    at new URLImpl (evalmachine.:2825:19)
    at exports.setup (evalmachine.:3037:16)
    at new URL (evalmachine.:3091:26)
    at Generator.next ()
    at new Promise ()
    digest: "3593854675"
    [TRPCError: Invalid base URL: https://] {
    code: 'INTERNAL_SERVER_ERROR',
    name: 'TRPCError'
    }

In the browser we:
Unhandled Runtime Error

Error: Invalid base URL: https://
Call Stack
new URLImpl
evalmachine. (2825:19)
exports.setup
evalmachine. (3037:16)
new URL
evalmachine. (3091:26)
Connection.execute
node_modules.pnpm@planetscale+database@1.7.0\node_modules@planetscale\database\dist\index.js (72:20)
execute
node_modules.pnpm\drizzle-orm@0.23.2-ec4bb7f_@planetscale+database@1.7.0\node_modules\drizzle-orm\planetscale-serverless\session.js (36:39)
Generator.next

next
node_modules.pnpm\drizzle-orm@0.23.2-ec4bb7f_@planetscale+database@1.7.0\node_modules\drizzle-orm\planetscale-serverless\session.js (8:70)
new Promise

_awaiter
node_modules.pnpm\drizzle-orm@0.23.2-ec4bb7f
@planetscale+database@1.7.0\node_modules\drizzle-orm\planetscale-serverless\session.js (4:11)
_awaiter
node_modules.pnpm\drizzle-orm@0.23.2-ec4bb7f
@planetscale+database@1.7.0\node_modules\drizzle-orm\planetscale-serverless\session.js (29:15)

Hope this help in resolving the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions