Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Invalid base URL #8

Open
ghost opened this issue May 22, 2023 · 0 comments
Open

TypeError: Invalid base URL #8

ghost opened this issue May 22, 2023 · 0 comments

Comments

@ghost
Copy link

ghost commented May 22, 2023

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:

[email protected] 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@[email protected]\node_modules@planetscale\database\dist\index.js (72:20)
execute
node_modules.pnpm\drizzle-orm@0.23.2-ec4bb7f_@planetscale[email protected]\node_modules\drizzle-orm\planetscale-serverless\session.js (36:39)
Generator.next

next
node_modules.pnpm\drizzle-orm@0.23.2-ec4bb7f_@planetscale[email protected]\node_modules\drizzle-orm\planetscale-serverless\session.js (8:70)
new Promise

_awaiter
node_modules.pnpm\[email protected]
@planetscale[email protected]\node_modules\drizzle-orm\planetscale-serverless\session.js (4:11)
_awaiter
node_modules.pnpm\[email protected]
@planetscale[email protected]\node_modules\drizzle-orm\planetscale-serverless\session.js (29:15)

Hope this help in resolving the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants