This project reproduces an issue with packaging Prisma in a pkg bundle.
- Run this on a Windows 11 OS (10 will likely be fine) with
node@18
- Clone
corepack prepare
oryarn set version 1.22.19
(or if you're using1.22.19
by default, skip this step)yarn
- Runs all of the commands necessary, but you can rerun them if you'd like:yarn generate
- generates two clients, one with a custom outputyarn build
- compiles TSyarn pkg
- packages both builds, one with the custom output clientyarn test
- runs both exes, showing the normal output passes but he custom fails
I've applied these workarounds to this project to try to get the test to pass:
pkg
doesn't supportnode@20
yet, so just to make sure we weren't using Prisma's node addon files built for v20 but pkg was using node@18, I've set theengines
restriction of this project to 18.- I've added the workaround that adds the client's
index.js
to theassets
array orpkg
, which is required to get thenormal
test passing, but thecustom
one continues to fail using the same strategy - This isn't applied, but I've tried adding
--public-packages '*'
to the custom test as mentioned in the prior GH issue workaround, but this doesn't change the end result