prisma: Can not Install: Missing query-engine-debian-openssl-1.1.x

Env info:

Running Ubuntu 18.04 in Windows 10 WSL 2.

Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:        18.04
Codename:       bionic

Globally installed prisma2: prisma2@2.0.0-preview022, binary version: f608db3b9e4f50f9a384356e532357b0a525969a

package.json

  "devDependencies": {
    "prisma2": "^2.0.0-preview022",
    "ts-node": "^8.6.2",
    "typescript": "^3.7.5"
  },
  "dependencies": {
    "@prisma/client": "^2.0.0-preview022"
  }

Error

> @prisma/client@2.0.0-preview022 postinstall [project]/node_modules/@prisma/client
> node scripts/postinstall.js

Error: Error: Command failed with ENOENT:[project]/node_modules/prisma2/query-engine-debian-openssl-1.1.x --enable_raw_queries cli 
--dmmf
spawn [project]/node_modules/prisma2/query-engine-debian-openssl-1.1.x ENOENT

Reproduce:

Run: npm install

> prisma2@2.0.0-preview022 install [project]/node_modules/prisma2
> node download-build/index.js

> Downloading Prisma engines for debian-openssl-1.1.x [====================] 100%


> @prisma/client@2.0.0-preview022 postinstall [project]/node_modules/@prisma/client
> node scripts/postinstall.js

Error: Error: Command failed with ENOENT:[project]/node_modules/prisma2/query-engine-debian-openssl-1.1.x --enable_raw_queries cli 
--dmmf
spawn [project]/node_modules/prisma2/query-engine-debian-openssl-1.1.x ENOENT
npm WARN postsnail-core@1.0.0 No repository field.

added 11 packages from 42 contributors and audited 11 packages in 7.457s
found 0 vulnerabilities

You can see debian-openssl-1.1.x was apparently saved successfully but after the operation, I do not see it in the node_modules/prisma2 directory:

[user]@DESKTOP: [project]/node_modules/prisma2$ ls -lah
total 12K
drwxrwxrwx 1 [user] [user]     512 Feb 18 17:22 .
drwxrwxrwx 1 [user] [user]     512 Feb 18 17:22 ..
-rwxrwxrwx 1 [user] [user]     1.1K Oct 26  1985 README.md
drwxrwxrwx 1 [user] [user]     512 Feb 18 17:22 build
drwxrwxrwx 1 [user] [user]     512 Feb 18 17:22 download-build
-rwxrwxrwx 1 [user] [user]      4 Feb 18 17:22 download-done
-rwxrwxrwx 1 [user] [user]      4.1K Feb 18 17:22 package.json
drwxrwxrwx 1 [user] [user]     512 Feb 18 17:22 prisma-client

Running as sudo will produce the same error.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 28 (12 by maintainers)

Most upvoted comments

Same problem inside docker

Error: Error: Command failed with ENOENT: /app/node_modules/prisma2/query-engine-debian-openssl-1.1.x --enable-raw-queries cli dmmf
spawn /app/node_modules/prisma2/query-engine-debian-openssl-1.1.x ENOENT

With node:slime, in Dockerfile I added this and fixed the issue: RUN apt-get -qy update && apt-get -qy install openssl

Same problem on ArchLinux. I needed to reinstall it.

In my case arch these commands helped:

rm -rf node_modules
npm i
npx prisma generate

@andriisoldatenko We do not compile for alpine yet so I would advice you to use a different docker image.

if i add to my dockerfile:

# Download and install glibc
RUN apk add --update curl && \
	curl -Lo /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
	curl -Lo glibc.apk "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk" && \
	curl -Lo glibc-bin.apk "https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-bin-${GLIBC_VERSION}.apk" && \
	apk add glibc-bin.apk glibc.apk && \
	/usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib && \
	echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf && \
	apk del curl && \
	rm -rf glibc.apk glibc-bin.apk /var/cache/apk/*

from https://github.com/prisma/prisma2/issues/702#issuecomment-569778198

it works!

Also on Windows an WSL @unlight? If not, please open a new issue and include all available information so we can try to reproduce this.