prisma: Docker on RPi 4 fail to run generate command - query-engine-debian-openssl-1.1.x (32bit OS)

Bug description

I’m trying to deploy a project with prisma2, nexus and graphql to a docker container on my raspberry pi 4. The node server crashes with an error: You most likely forgot to initialize the Prisma Client. Please run prisma generate and try to run it again. If that does not solve your problem, please open an issue.

If I run yarn prisma generate I receive a following error:

Get config /app/node_modules/@prisma/cli/query-engine-debian-openssl-1.1.x: 1: /app/node_modules/@prisma/cli/query-engine-debian-openssl-1.1.x: Syntax error: "(" unexpected

Any input is appreciated, thank you.

Dockerfile

FROM node:latest

RUN apt-get update && apt-get install --no-install-recommends --yes openssl

WORKDIR /app

COPY ./package.json .
COPY ./yarn.lock .

RUN yarn install

COPY . .

EXPOSE 4444

CMD yarn dev

Project dependencies

"dependencies": {
    "@nexus/schema": "^0.15.0",
    "@types/express": "^4.17.8",
    "@types/node": "^12.12.56",
    "apollo-server-express": "^2.17.0",
    "cookie-parser": "^1.4.5",
    "cross-env": "^7.0.2",
    "express": "^4.17.1",
    "graphql": "^14.7.0",
    "graphql-middleware": "^4.0.2",
    "graphql-shield": "^7.3.6",
    "jsonwebtoken": "^8.5.1",
    "nexus": "^0.26.1",
    "nexus-plugin-prisma": "^0.19.0",
    "ts-node": "^9.0.0",
    "typescript": "^4.0.2"
  },
  "devDependencies": {
    "ts-node-dev": "^1.0.0-pre.62"
  }

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 21 (10 by maintainers)

Most upvoted comments

We are currently working on providing binaries for ARM. The reason this is not trivial is because the build process has to be integrated into our CI system. Our CI currently runs on x86 machines. In order to integrate we started to look into cross compiling. Support in Rust is good here but we also needed OpenSSL compiled for ARM to link against at build time. This was quite some work but we are nearing the finish line 😃

We are currently working on providing binaries for ARM. The reason this is not trivial is because the build process has to be integrated into our CI system. Our CI currently runs on x86 machines. In order to integrate we started to look into cross compiling. Support in Rust is good here but we also needed OpenSSL compiled for ARM to link against at build time. This was quite some work but we are nearing the finish line 😃

Many thanks for taking this on. Any ~ETA when we can expect this to be available? Doesn’t have to be stable, just “usable” 😃

PS: only really interested in arm64

@kilrau ARM aarch64 ( I think which is basically arm64, different names by different vendors) binaries are available in the dev channel right now if you are interested.

Install the dev channel like so npm install @prisma/cli@dev @prisma/client@dev

@theboxer No need for that, we will figure this out. Thanks for reporting!

@pantharshit00 you saved me. with your binaries I successfully build my docker image which do prisma generate during build. Thank you so much.

Hello everyone here

At the current moment, we are not adding 32bit target in the official release pipeline.

But for Pi and ARMv7, I have put together this repository which has precompiled 32 bit engines for these platforms and you can use prisma via this in the meantime: https://github.com/pantharshit00/prisma-rpi-builds

This will build the engine on every stable release.

2020-10-01_12-00

I can reproduce this issue as well. I think this is being caused as raspbian is a 32bit operating system and we build the ubuntu binary for a 64bit ubuntu system. I am not sure if we want to support this.

You can try again with a 64bit version of raspbian which is in beta