Home > Web Front-end > JS Tutorial > Prisma: Could not parse schema engine response

Prisma: Could not parse schema engine response

Mary-Kate Olsen
Release: 2024-12-24 00:27:10
Original
403 people have browsed it

Prisma: Could not parse schema engine response

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
Copy after login

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".
Copy after login

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
Copy after login

I added these lines to it:

# install openssl
RUN apk update && apk upgrade
RUN apk add --no-cache openssl
Copy after login

And, that solved the problem.

The above is the detailed content of Prisma: Could not parse schema engine response. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template