prisma: [regression] `Schema engine error` in Prisma 5.19.0

Bug description

Version 5.19.0 appears broken to me. npx prisma migrate dev --name init simply gives error

risma:getConfig Using getConfig Wasm +0ms
prisma:getConfig config data retrieved without errors in getConfig Wasm +1ms
Error: Error: Schema engine error:

    at Cf (/home/satadhi.halde/Documents/nestjs-practise/prisma-prac/node_modules/prisma/build/index.js:432:1600)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async nl (/home/satadhi.halderDocuments/nestjs-practise/prisma-prac/node_modules/prisma/build/index.js:513:1789)
    at async Sm.parse (/home/satadhi.halderDocuments/nestjs-practise/prisma-prac/node_modules/prisma/build/index.js:943:72)
    at async s2t (/home/satadhi.halderDocuments/nestjs-practise/prisma-prac/node_modules/prisma/build/index.js:2002:1678)

How to reproduce

Followed steps in nestjs docs

The env file looks like this.

DATABASE_URL="mysql://root:password@127.0.0.1:3306/nestjs_prisma"

MYSQL_DATABASE=nestjs_prisma
MYSQL_ROOT_PASSWORD=password

I use docker-compose.yaml to run sql

services:
  mysql:
    image: mysql
    env_file:
      - .env
    ports:
      - '3306:3306'

Expected behavior

It should just run normally. I tried using version 5.18.0 everything works expected

Prisma information

// Add your schema.prisma
generator client {
  provider = "prisma-client-js"
}

datasource db {
  provider = "mysql"
  url      = env("DATABASE_URL")
}

model Product {
  id   Int    @id @default(autoincrement())
  name String
}


Environment & setup

  • OS: Ubuntu 22.04.2 LTS
  • Database: MySQL
  • Node.js version: 20.14.0

Prisma Version

5.19.0

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 6
  • Comments: 21 (11 by maintainers)

Commits related to this issue

Most upvoted comments

This should be fixed in the 5.19.1 version, closing this now.

removed,

satadhi.halder:~/Documents/nestjs-practise/prisma-prac$ dpkg -l | grep libssl
ii  libssl3:amd64                              3.0.2-0ubuntu1.17                       amd64        Secure Sockets Layer toolkit - shared libraries

Output of npx prisma --version

$ npx prisma --version
Environment variables loaded from .env
prisma                  : 5.19.0
@prisma/client          : 5.19.0
Computed binaryTarget   : debian-openssl-3.0.x
Operating System        : linux
Architecture            : x64
Node.js                 : v20.14.0
Query Engine (Node-API) : libquery-engine 5fe21811a6ba0b952a3bc71400666511fe3b902f (at node_modules/@prisma/engines/libquery_engine-debian-openssl-3.0.x.so.node)
Schema Engine           : schema-engine-cli 5fe21811a6ba0b952a3bc71400666511fe3b902f (at node_modules/@prisma/engines/schema-engine-debian-openssl-3.0.x)
Schema Wasm             : @prisma/prisma-schema-wasm 5.19.0-31.5fe21811a6ba0b952a3bc71400666511fe3b902f
Default Engines Hash    : 5fe21811a6ba0b952a3bc71400666511fe3b902f
Studio                  : 0.502.0

@satadhi so the OpenSSL error is a separate issue and unrelated to the original problem you were facing, right? It’s better to uninstall it, yes, there’s no reason to use OpenSSL 1.1 which has been officially EOL upstream for a year already (even if distros may still support it).

@satadhi this is unexpected but is there a reason you have OpenSSL 1.1 installed on your system? Did you install it with apt or in some other way? Right now Prisma prefers an older version of OpenSSL when multiple are installed for reasons, so if you only left OpenSSL 3 installed (which should be the default on Ubuntu 22.04) and regenerated the client, it should resolve the issue.

We should investigate what looks like a sudden bump in the requirements from OpenSSL 1.1.0 to OpenSSL 1.1.1 regardless. Maybe it comes from https://github.com/prisma/prisma-engines/pull/4965.

@jkomyno Hi its all linked sir, my npm install @prisma/client is also broken which is of version 5.19.0. Manually changing the version to 5.18.0 works fine.

I have used the basic setup of nestjs.

Below is the error when i used 5.19.0

PrismaClientInitializationError: Unable to require(/home/satadhi/Documents/nestjs-practise/prisma-prac/node_modules/.prisma/client/libquery_engine-debian-openssl-1.1.x.so.node).
The Prisma engines do not seem to be compatible with your system. Please refer to the documentation about Prisma's system requirements: https://pris.ly/d/system-requirements

Details: /lib/x86_64-linux-gnu/libssl.so.1.1: version OPENSSL_1_1_1' not found (required by /home/satadhi/Documents/nestjs-practise/prisma-prac/node_modules/.prisma/client/libquery_engine-debian-openssl-1.1.x.so.node)



Hey @satadhi, can you please run the following command, and report back the output? Thanks.

npx prisma --version

This gives us much more information than just “5.19.0”, and may help us assessing this further. Thanks!