Atharva Bhange
06/14/2022, 6:58 PMRUN
command of npx prisma generate
when i build my image i am getting error Error: Get config: Unable to establish a connection to query-engine-node-api library
The base image of my dockerfile is node:16-slim
my prisma schema ha
generator client {
provider = "prisma-client-js"
binaryTargets = ["native"]
}
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
Any Ideas why this is happening ?Austin
06/14/2022, 9:37 PMDockerfile
and Prisma Client versions so I can attempt to recreate this?Atharva Bhange
06/14/2022, 10:27 PMFROM node:16-slim
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn
COPY . ./
ARG CURR_ENV
RUN echo "CURRENT ENV : ${CURR_ENV}"
RUN npx prisma generate
RUN if [ "$CURR_ENV" != "dev" ]; then yarn build; fi
# RUN
CMD ["yarn","dev"]
Docker file
version: '3.7'
services:
some-name:
container_name: some name
env_file:
- ./.env
build :
context: .
args:
CURR_ENV : dev
image: some-name
volumes:
- ./:/app
- /app/node_modules
command: yarn run dev
Docker ComposeAtharva Bhange
06/14/2022, 10:29 PM"@prisma/client": "^3.15.1",
"prisma": "^3.15.1"
Atharva Bhange
06/14/2022, 10:30 PMAtharva Bhange
06/15/2022, 11:52 AM