well, here we go. Guys i'm with a problem with def...
# orm-help
b
well, here we go. Guys i'm with a problem with default generated client ( node_modules ) I know that prisma uses hook to do the task , but it seems not work when my application is deployed using elastic beanstalk. The aws elb says that it do the npm install by it own, and if you need to install dev dependencies you have to add a variable to ignore --production. i tried do that, but it doesn't worked. After i puted the @prisma/cli in regular package area, but it seems the hook is not working in anyway. Someone faces this problem too?
the problem with that, is that the deploy fails because can't compile TS. It don't find the prisma/client
n
I’m not familiar with Elastic Beanstalk but I might have an idea: You could try adding a “prebuild” or “prestart” script in your package.json which generates the Prisma types before attempting to build or run your application. So this “pre”-script should run the “prisma generate” command or another npm script which runs that.
r
Hey @Bruno Casado 👋 Could you check the solution from this thread out? I think this should work in beanstalk. If the above doesn’t work, you can use the Docker environment instead of Node and I could share a sample
Dockerfile
that you can add to your project, edit as per your choice and deploy to Beanstalk.
b
@Nino Vrijman @Ryan i'll check the answers. thanks for the help! i'm not satisfied but for now i solved specifying a client target. After the currently deploy finish i'll give a try in either pre script and unsafe-perm
👍 1
target doesn't worked.... ( i commited the client )
Copy code
\nInvalid `prisma.diagnose.findFirst()` invocation:\n\n\n  Query engine binary for current platform \"rhel-openssl-1.0.x\" could not be found.\nThis probably happens, because you built Prisma Client on a different platform.
lol i found the logs:
Copy code
[Error: EACCES: permission denied, mkdir '/tmp/deployment/application/node_modules/.prisma'] {
    errno: -13,
    code: 'EACCES',
    syscall: 'mkdir',
    path: '/tmp/deployment/application/node_modules/.prisma'
  }
it seem that unsafe-perm is related
@Ryan it worked! thanks a lot! thanks @Nino Vrijman for ur attention
🙌 1
👍 1