Hi everyone. I have problem in my Application dock...
# orm-help
l
Hi everyone. I have problem in my Application dockerized prisma with mysql and node 16, about this I'm use the command docker-compose to set up my API. However, I'm getting error "Error: Command failed: /usr/src/app/node_modules/.bin/mmdc -i /tmp/prisma-erd-MvByKD/prisma.mmd -o /usr/src/app/prisma/ERD.svg -t forest -c /tmp/prisma-erd-MvByKD/config.json" in the last step. Even after updating my prisma.schema file the problem remains, but I don't know solve this issue. Can someone help me please? Thanks in advance.
r
Hi @Lauany Reis da Silva 👋 Which command did you run that generated this error?
v
Hey @Lauany Reis da Silva, did you have a chance to see Raphael's message? Please let us know if this is an app in production and we'll help you troubleshoot!
l
Hello, I found out that it was an error caused by not having the prisma-erd-generator package on the machine and taking it out stopped with the previous error...
But now a worse error is occurring:
{"status":"error","message":"Internal server error - ErrorCode TypeError, undefined, TypeError: Cannot create property 'clientVersion' on boolean 'true'\n at RequestHandler.handleRequestError (/home/lauany-silva/ workspace/Tools_Back/node_modules/@prisma/client/runtime/index.js:29919:26)\n at /home/lauany-si lva/workspace/Tools_Back/node_modules/@prisma/client/runtime/index.js:30336 :25\n at processTicksAndRejections (node:internal/process/task_queues:96:5)\n at async PrismaClient._executeRequest (/home/lauany-silva/workspace/Tools_Back/node_modules/@prisma/client/runtime/index.js :30893:22) Cannot create propert and 'clientVersion' on boolean 'true'"}
! The command I used was the ones available in the Dockerfile, and they are:
Copy code
FROM node:16.16-alpine as base
EXPOSE 3000

RUN mkdir -p /usr/src/app

RUN chmod -R 777 /usr/src/app/

WORKDIR /usr/src/app

RUN npm install npm@8.19.2 -g
RUN npm install pm2 -g
ENV PM2_PUBLIC_KEY ****************
ENV PM2_SECRET_KEY ****************

RUN npm install prisma @prisma/client

COPY package.json yarn.lock pm2.json /usr/src/app/

RUN CI=true
RUN npm install --legacy-peer-deps
RUN yarn
RUN yarn prisma_init

FROM base as production
ENV NODE_ENV=production
COPY . /usr/src/app/
RUN yarn generate
RUN yarn push
CMD ["pm2-runtime", "start", "pm2.json"]

FROM base as dev
ENV NODE_ENV=development
COPY . /usr/src/app/
RUN yarn generate
RUN yarn migrate
CMD [ "yarn", "dev" ]
@Raphael Etim and @Vladi Stevanovic, I've done a lot of research on forums and other communities, but nothing that helped me to solve this new problem. Can you help me?
r
Hi @Lauany Reis da Silva, I'm taking a look at this and will get back to you on it.
Can you share the code block that is causing this error
cannot create property clienVersion on boolean 'true'
Also in your docker file, you have
RUN npm install prism @prisma/client
. You have a typo at
prism
. It should be
prisma
.
Hi @Lauany Reis da Silva, Can you please let us know if you still need help with this or you are all set?