Prisma: Could not parse schema engine response
Akbar Ali

Akbar Ali @pulimoodan

About: Web dev and designer.

Location:
Kerala, India
Joined:
Jan 15, 2022

Prisma: Could not parse schema engine response

Publish Date: Dec 19 '24
4 4

Problem

Recently encountered this error while deploying our app to production:

Error: Could not parse schema engine response: SyntaxError: Unexpected token E in JSON at position 0
Enter fullscreen mode Exit fullscreen mode

There is no more explanation why this occurred, just this line. In the recent merge commit we had only changed a couple of locale keywords, that's it.

Figuring out

Searched all over the internet and found nothing.

Then, I noticed a warning a couple lines of above the error, like this:

prisma:warn Prisma failed to detect the libssl/openssl version to use, and may not work as expected. Defaulting to "openssl-1.1.x".
Enter fullscreen mode Exit fullscreen mode

I searched about this on GitHub and found this:
Prisma fails to find openssl 3.0.x on new bookworm

I realised that for some reasons, the new version of the alpine docker image I was using doesn't come with the openssl package - Which was required for Prisma engine.

Solution

The issue discussion I shared above said that use node version 18.5.something and we can temporarily resolve this or use a different docker image.

But, I don't have to use a different version of node and make conflicts to other packages.

So, I should install the package manually.

This is the docker image I was using:

FROM node:18-alpine
Enter fullscreen mode Exit fullscreen mode

I added these lines to it:

# install openssl
RUN apk update && apk upgrade
RUN apk add --no-cache openssl
Enter fullscreen mode Exit fullscreen mode

And, that solved the problem.

Comments 4 total

  • Dev
    DevJan 9, 2025

    Thanks!

  • josepe342
    josepe342Mar 19, 2025

    Thanks, this was really helpful.

  • Shreyank Jadiya
    Shreyank JadiyaJul 27, 2025

    This is life saver. We exactly had the same problem and was wondering what could be wrong and found this.

    Same issue, no major changes in the app, still docker image was failing in production.

    installed these two commands and build went through successfully in production.

    • Akbar Ali
      Akbar AliAug 2, 2025

      Glad my post could help. Cheers 🥂

Add comment