prisma / prisma-examples

🚀 Ready-to-run Prisma example projects
https://www.prisma.io/docs/
Apache License 2.0
6.05k stars 1.42k forks source link

serverless aws-nodejs-typescript with lambda layers example #4085

Open kaykhan opened 1 year ago

kaykhan commented 1 year ago

I'm hoping i could get some help with getting prisma to work via a lambda layer with serverless typescript template. https://www.serverless.com/framework/docs/providers/aws/cli-reference/create

The template can be bootstraped using the following command - serverless create --template aws-nodejs-typescript --path myService

The usecase behind this been outlined here - https://dev.to/sabinthedev/managing-lambda-size-with-multiple-prisma-clients-4m8l - the difference is the example does not use the typescript template.

I believe there are some packaging difference between the example in the blog above by sabinthedev and the aws-nodejs-typescript template. Ultimately the error i am receiving is

✖ Error: ENOENT: no such file or directory, open '/home/app1/.esbuild/.build/schema.prisma'

You can find a minimal reproduction of this here - https://github.com/kaykhan/prisma-typescript-example

hayder-nearsure commented 1 year ago

I'm getting the same error

noecende commented 1 year ago

Were you able to solve it? I'm getting the same error.