For a production project of ours I want to run Pri...
# orm-help
n
For a production project of ours I want to run Prisma 1 and Prisma 4 side by side which should be possible according to https://www.prisma.io/docs/guides/upgrade-guides/upgrade-from-prisma-1/how-to-upgrade#upgrade-strategies. However, when I try to run any prisma 4 command like
init
I get an error saying a Prisma 1 project was detected and the command is aborted ๐Ÿ˜• Does anyone know how to work around this?
๐Ÿ‘€ 1
โœ… 1
a
Hey Nino ๐Ÿ‘‹๐Ÿพ Have you installed Prisma 1 CLI globally on your machine? This could lead to the โ€œwrongโ€ command being called
n
I did but the same error still remains after uninstalling the cli globally (and even restarting my laptop) ๐Ÿ˜ž
The error is thrown when a
prisma.yml
file exists according to this: https://github.com/prisma/prisma/blob/e8136ea6f62582ed49b5549108283c0a45e4e422/packages/cli/src/utils/detectPrisma1.ts. If it should be possible to run Prisma 1 and Prisma2+ side by side shouldnโ€™t it be allowed for that file to exist? Or should I remove the
prisma.yml
, check all the required GraphQL files and generated types into source control and then continue setting up Prisma 2?
a
Hey Nino, Iโ€™ve forwarded your question to my colleagues to help figure this out ๐Ÿ™‚
a
Hey Nino, sorry you're running into this. I haven't seen this one before but I recommend trying your suggestion โ€“ temporarily rename
prisma.yml
and generate your prisma client, than rename it as
prisma.yml
again
n
Renaming the
prisma.yml
file works just fine ๐Ÿ‘ Maybe renaming the
prisma.yml
file should be documented somewhere because it is definitely still necessary when upgrading, for example when running the
prisma-upgrade
cli tool.
Thanks for the help though ๐Ÿ™