Hi here,
I tried to deploy my RW app (dbAuth) on Vercel following the tutorial.
The deploy is running well but when try to use the live app, but it not works…
I checked the console and i constate that when i signin or signup, i can see in console/network that the graphql auth request is ok, but the getCurrentUser graphql request not works, so the app si not usable.
In the console, for this request, the payload is
{"query":"query __REDWOOD__AUTH_GET_CURRENT_USER { redwood { currentUser } }"}
and returns the 500 error with : FUNCTION_INVOCATION_FAILED
So i checked the vercel logs and get this error:
{
"Invoke Error": {
"errorType": "Error",
"errorMessage": "Cannot find module '../lib/generateGraphiQLHeader'\nRequire stack:\n- /var/task/api/dist/functions/graphql.js\n- /var/task/___vc/__launcher.js\n- /var/runtime/index.mjs",
"code": "MODULE_NOT_FOUND",
"requireStack": [
"/var/task/api/dist/functions/graphql.js",
"/var/task/___vc/__launcher.js",
"/var/runtime/index.mjs"
],
"stack": [
"Error: Cannot find module '../lib/generateGraphiQLHeader'",
"Require stack:",
"- /var/task/api/dist/functions/graphql.js",
"- /var/task/___vc/__launcher.js",
"- /var/runtime/index.mjs",
" at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)",
" at Module._load (node:internal/modules/cjs/loader:922:27)",
" at Module.require (node:internal/modules/cjs/loader:1143:19)",
" at require (node:internal/modules/cjs/helpers:110:18)",
" at Object.<anonymous> (/var/task/api/dist/functions/graphql.js:47:45)",
" at Module._compile (node:internal/modules/cjs/loader:1256:14)",
" at Module._extensions..js (node:internal/modules/cjs/loader:1310:10)",
" at Module.load (node:internal/modules/cjs/loader:1119:32)",
" at Module._load (node:internal/modules/cjs/loader:960:12)",
" at Module.require (node:internal/modules/cjs/loader:1143:19)"
]
}
}
Is someone have the same issue? a workaround?
Thanks