nx-tools icon indicating copy to clipboard operation
nx-tools copied to clipboard

nx-prisma:migrate failing: "Prisma Migrate has detected that the environment is non-interactive, which is not supported"

Open Flip-Liquid opened this issue 1 year ago • 1 comments

Problem

When attempting to add a new field on an existing table, I'm using yarn nx run <project_name>:migrate to perform the migration after having added the fields on my schema.

The above command fails with the following error: "Prisma Migrate has detected that the environment is non-interactive, which is not supported". The same command has worked previously, so I suspect it's the specific changes to the schema which are causing the error.

Attempted workarounds

Running the prisma command yarn prisma migrate dev directly. This works: image

Expected behavior

The NX command should support interactivity with prisma migrate dev.

Comments

It seems like this is a known issue. Prisma docs call it out: https://www.prisma.io/docs/concepts/components/prisma-migrate#troubleshooting

Also related to https://github.com/prisma/prisma/issues/9943

Flip-Liquid avatar Jul 29 '22 17:07 Flip-Liquid

@Flip-Liquid please try with nx-prisma 4.0.0 and let me know if still happens 😄

gperdomor avatar Nov 15 '22 01:11 gperdomor