Hello, I deployed a nextJs app on Vercel and I us...
# support-questions-legacy
m
Hello, I deployed a nextJs app on Vercel and I use superTokens (recipe email/password). I had setup the user management dashboad and it works well on dev environment (api/auth/dashboard) where I can edit the users. But on the version deployed on Vercel the endpoint (api/auth/dashboard) return an error 500. Does anyone know this problem and any idea how to fix it? Here is the stack trace
Copy code
TypeError: Cannot read properties of undefined (reading 'split')
    at new SuperTokens (/var/task/node_modules/supertokens-node/lib/build/supertokens.js:352:24)
    at SuperTokensWrapper.init (/var/task/node_modules/supertokens-node/lib/build/supertokens.js:389:36)
    at 8767 (/var/task/.next/server/pages/api/auth/[[...path]].js:96:37)
    at __webpack_require__ (/var/task/.next/server/webpack-api-runtime.js:25:42)
    at __webpack_exec__ (/var/task/.next/server/pages/api/auth/[[...path]].js:134:39)
    at /var/task/.next/server/pages/api/auth/[[...path]].js:135:65
    at __webpack_require__.X (/var/task/.next/server/webpack-api-runtime.js:108:21)
    at /var/task/.next/server/pages/api/auth/[[...path]].js:135:47
    at Object.<anonymous> (/var/task/.next/server/pages/api/auth/[[...path]].js:138:3)
    at Module._compile (node:internal/modules/cjs/loader:1218:14)
RequestId: 4992e694-1b7e-4215-a855-da1f04a6afff Error: Runtime exited with error: exit status 1
Runtime.ExitError
r
hey @maximesohet @nkshah2 can help here.
n
Hi @maximesohet , Can you confirm that non-dashboard APIs (login/logout for example) work fine for you?
Also can you post the config you pass to SuperTokens init? If you are using environment variables make sue that the environment variable you use for the connection uri is set correctly in your Vercel production deployment
12 Views