Asad Malik
Asad Malik
KKinde
Created by Asad Malik on 11/2/2024 in #💻┃support
NUXT. Vue. Error 500 while accessing /api/login, while it works fine when running dev server.
Hi, I am using kinde with Nuxt, Vue, Nitro. While it works fine with run dev, it's giving server error 500 when running the build.
.app>node .output/server/index.mjs
Listening on http://[::]:3000
[nuxt] [request error] [unhandled] [500] Invalid URL
at new URL (node:internal/url:796:36)
at AuthorizationCode.<anonymous> (/[PROJECT_PATH]/.app/.output/server/node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthorizationCode.js:114:35)
at step (/[PROJECT_PATH]/.app/.output/server/node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthorizationCode.js:47:23)
at Object.next (/[PROJECT_PATH]/.app/.output/server/node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthorizationCode.js:28:53)
at fulfilled (/[PROJECT_PATH]/.app/.output/server/node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthorizationCode.js:19:58)
.app>node .output/server/index.mjs
Listening on http://[::]:3000
[nuxt] [request error] [unhandled] [500] Invalid URL
at new URL (node:internal/url:796:36)
at AuthorizationCode.<anonymous> (/[PROJECT_PATH]/.app/.output/server/node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthorizationCode.js:114:35)
at step (/[PROJECT_PATH]/.app/.output/server/node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthorizationCode.js:47:23)
at Object.next (/[PROJECT_PATH]/.app/.output/server/node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthorizationCode.js:28:53)
at fulfilled (/[PROJECT_PATH]/.app/.output/server/node_modules/@kinde-oss/kinde-typescript-sdk/dist/sdk/oauth2-flows/AuthorizationCode.js:19:58)
Same errors in browser console: `GET http://localhost:3000/api/login/ 500 (Internal Server Error) 10:08:19.956 w8GjRO4B.js:2 [nuxt] error caught during app initialization Error: Page not found: /api/login/ at tn (w8GjRO4B.js:2:20035) at w8GjRO4B.js:6:31212 at o (w8GjRO4B.js:2:18201) at Object.runWithContext (qTkC9Z7f.js:13:19110) at so (w8GjRO4B.js:2:18240) at w8GjRO4B.js:2:16245 at Or.run (qTkC9Z7f.js:9:267) at Object.runWithContext (w8GjRO4B.js:2:16237) at w8GjRO4B.js:6:31190 at w8GjRO4B.js:6:20763
4 replies