A few days ago, all my GitHub actions started to f...
# prisma-client
p
A few days ago, all my GitHub actions started to fail, because the Prisma client failed to generate and thus the types were missing. I still was not able to figure out, why the following happens:
Copy code
➤ YN0007: │ prisma@npm:2.30.3 must be built because it never has been before or the last one failed
141
  ➤ YN0007: │ @prisma/client@npm:2.30.3 [2a8e9] must be built because it never has been before or the last one failed
142
  ➤ YN0000: │ @prisma/client@npm:2.30.3 [2a8e9] STDOUT Prisma schema loaded from prisma/schema.prisma
143
  ➤ YN0000: │ @prisma/client@npm:2.30.3 [2a8e9] STDERR info The postinstall script automatically ran `prisma generate`, which failed.
144
  ➤ YN0000: │ @prisma/client@npm:2.30.3 [2a8e9] STDERR The postinstall script still succeeds but won't generate the Prisma Client.
145
  ➤ YN0000: │ @prisma/client@npm:2.30.3 [2a8e9] STDERR Please run `yarn prisma generate` to see the errors.
146
  ➤ YN0000: │ @prisma/client@npm:2.30.3 [2a8e9] STDOUT
It works fine locally. Anybody has an idea?
r
Is this after running
yarn prisma generate
?
p
It happens while running
yarn install --immutable
(Using yarn berry. I tried both yarn 2 and yarn 3. It worked fine with yarn 2 in the past.)
Running
yarn prisma migrate
manually after
yarn install --immutable
solves the issue. Maybe this is some kind of timing issue? I have
nexus-prisma
installed, which is generated along with prisma:
Copy code
generator nexus {
    provider = "nexus-prisma"
}
r
Do you have the binary targets provided?
Also what happens if you manually run
prisma generate
? Does it error out or run successfully?
p
Manually running
prisma generate
works fine. I fixed my CI actions by adding an additional step after `yarn install --immutable`:
yarn prisma generate
binaryTargets
is set to
native
.