Ekansh Vinaik
06/07/2022, 6:21 PMschema.prisma
in the .zip package generated
we’re using packages.individually=true
, packages.pattern=./schema.prisma
. Using those, the output is like:
lambda.zip
expanded:
• schema.prisma
• subfolder/
◦ sub subfolder/
▪︎ index.js
▪︎ index.js.map
and I get an error that schema.prisma
isn’t found in sub subfolder
. any way to include that schema.prisma
file down there/does anyone know what the best way to include .prisma
files is here? we’re using serverless-esbuild
+ seedEkansh Vinaik
06/07/2022, 6:24 PMprisma
(we have Hasura but have found it to be slow, using prisma for a slow but frequent query so could use any ORM)Frank
scheme.prisma
file is packaged to the wrong path in the zip right?Frank
serverless package
locally and see if the path is correct?Ekansh Vinaik
06/08/2022, 3:01 PMbefore_X
hook, if so what does it look like, etc.)Ekansh Vinaik
06/08/2022, 3:01 PMserverless package
and see the individual packages? I couldn’t get this working locally, had to deploy to a Lambda and download the zip to see the individual zip (i.e. packages.individually=true
in serverless.yml is seemingly not respected when running serverless package
)Frank
Frank
serverless package
locally, and u should be able to find the zip inside the .serverless
folder.Ekansh Vinaik
06/08/2022, 3:02 PMFrank
before_build
.Ekansh Vinaik
06/08/2022, 3:16 PMschema.prisma
at the root of the .zip
from serverless package
, but it’s not adjacent to the generated index.js
. Wondering if there’s a command I can run before the files get zipped to move it over?
Structure of zip:
• schema.prisma
• subfolder/
◦ subfolder/
▪︎ index.js
▪︎ index.js.map
Wanted structure:
• subfolder/
◦ subfolder/
▪︎ index.js
▪︎ index.js.map
▪︎ schema.prisma
Frank
Frank
Ekansh Vinaik
06/08/2022, 9:07 PMEkansh Vinaik
06/08/2022, 9:07 PMserverless package
/ serverless invoke local
, but I think copying the files does something weird on Seed?Ekansh Vinaik
06/08/2022, 9:07 PMError: EFAULT: bad address in system call argument, read
at Object.readSync (fs.js:592:3)
at Object.fs.readSync (/tmp/seed/source/node_modules/serverless/node_modules/graceful-fs/polyfills.js:154:28)
at tryReadSync (fs.js:366:20)
at Object.readFileSync (fs.js:395:19)
at /tmp/seed/source/node_modules/serverless-esbuild/dist/utils.js:125:47
at Array.forEach (<anonymous>)
at WriteStream.<anonymous> (/tmp/seed/source/node_modules/serverless-esbuild/dist/utils.js:121:27)
at WriteStream.emit (events.js:315:20)
at WriteStream.EventEmitter.emit (domain.js:467:12)
at /tmp/seed/source/node_modules/serverless-esbuild/node_modules/graceful-fs/graceful-fs.js:335:14
at /tmp/seed/source/node_modules/serverless-esbuild/node_modules/graceful-fs/graceful-fs.js:362:16
at /tmp/seed/source/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:362:16
at FSReqCallback.oncomplete (fs.js:171:23)
Ekansh Vinaik
06/08/2022, 9:09 PMcurr-dir/node_modules
to build.initialOptions.outdir