Intermittent Prisma Error in Production

Quick note on how to downgrade to prisma 2.11.0 if you prefer that route:

In your project’s root package.json and in api/package.json add

  "resolutions": {
    "@prisma/client": "2.11.0",
    "@prisma/cli": "2.11.0",
    "@prisma/sdk": "2.11.0"
  }

Then run

yarn

Check your yarn.lock file to make sure @prisma/client is resolved to the correct version. It should look like this:

"@prisma/client@2.11.0", "@prisma/client@2.12.1": // <--- this bit is important
  version "2.11.0"
  resolved "https://registry.yarnpkg.com/@prisma/client/-/client-2.11.0.tgz#574c1aa3b571ea01c0fa8dca348c6ba5db41dcc9"
  integrity sha512-BF7K/yi5fAnrt7MelQqUueJyl06IGmIxf+7f5RxFSvyO6xZMbOYxhW21kV2wt10mOIS0khQbo0xY6w/8jViJuQ==
  dependencies:
    "@prisma/engines-version" "2.11.0-10.58369335532e47bdcec77a2f1e7c1fb83a463918"

I believe the process is the same for upgrading to newer versions, but not something I’ve tested.

Updated: also add cli and sdk to resolutions, just to prevent compatibility issues

1 Like