sst: Prisma bundling broken after release v3.3.16
I have a similar setup to the Prisma lambda example , however after release v3.3.16 I’ve discovered that the bundling no longer works as before and I receive the following error response:
Prisma Client could not locate the Query Engine for runtime \"rhel-openssl-3.0.x\".\n\nThis is likely caused by a bundler that has not copied \"libquery_engine-rhel-openssl-3.0.x.so.node\" next to the resulting bundle.\nEnsure that \"libquery_engine-rhel-openssl-3.0.x.so.node\" has been copied next to the bundle or in \"../../node_modules/.prisma/client\".
I’ve tried a few different configuration options but so far my only workaround is to downgrade back to v3.3.14.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 33 (11 by maintainers)
@corybill I haven’t used remix, but looking at the docs the API seems to be similar to nextjs. In which case, you should be able to use this to configure copyFiles with the server function: https://sst.dev/docs/component/aws/remix#transform-server
Okay, some more information after I’ve dedicated some time to get a workaround in place because of FOMO not being able to upgrade SST for so long.
Using the knowledge from the discord thread and the findings that a path with
.prismadoesn’t work for now, this is how I’ve worked around it:Added a custom client output path to
schema.prismaso that the default path.prismais not used:Then in my ApiGatewayV2 route handler I’ve added the following configuration to copy the generated client engine:
And it works 🎉
I’ll try it out.