anyone had any issues using prisma in a serverless...
# prisma-whats-new
j
anyone had any issues using prisma in a serverless function on aws lambda, getting an error from the ws package from apollo
b
Well since the lamda instance is deleted right after execution, websockets don’t make sense., since they are supposed to have an open connection
j
yeah I know that, that's not my issue
the issue is, the instance of prisma is failing because of ws
Copy code
module initialization error: Error
at Error (native)
at Object.fs.openSync (fs.js:641:18)
at Object.fs.readFileSync (fs.js:509:33)
at Object.Module._extensions..js (module.js:578:20)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/var/task/node_modules/subscriptions-transport-ws/dist/client.js:19:27)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
n
when is this happening? for every request, on initializiation, or sometime else?
j
every request @nilan serverless function using prisma-binding
n
wait, so are you deploying GraphQL Yoga using serverless?
you can use
up
, it allows you to deploy the express server on Lambda