Title
a

alisalimli

07/27/2021, 1:50 PM
is there any problem if i install prisma dependency as normal dependecy(not dev dependency i mean)
r

Ryan

07/27/2021, 1:53 PM
No there isn’t any problem. Only thing your docker image might get a bit larger.
a

alisalimli

07/27/2021, 2:00 PM
i am asking,because const run = util.promisify(exec);   await run("npx prisma migrate deploy");   await run("npx prisma generate");
import { exec } from "child_process";
i did what you said,but it's giving me the following error now -> Error: prisma client did not initialize yet. Please run "prisma generate" and try to import it again.
r

Ryan

07/27/2021, 2:05 PM
Where are you running this?
a

alisalimli

07/28/2021, 2:41 AM
the error : UnhandledPromiseRejectionWarning: Error: Command failed: npx prisma migrate deploy Error: Can't write to /abb/node_modules/@prisma/engines please make sure you install "prisma" with the right permissions.sions. at ChildProcess.exithandler (child_process.js:319:12) at ChildProcess.emit (events.js:375:28) at maybeClose (internal/child_process.js:1055:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5) (Use
node --trace-warnings ...
to show where the warning was created)
r

Ryan

07/28/2021, 7:04 AM
Is this running in your Docker image?
a

alisalimli

07/28/2021, 7:09 AM
yeah
i am running "npx prisma generate" on Dockerfile
i think it is not possible running prisma in virtual machine.You should use managed database(i can deploy prisma with managed database btw)
the problem is if you using virtual machine,you can only access database in virtual machine
but prisma gives me that error
r

Ryan

07/28/2021, 7:16 AM
You can. Just point it to the managed database URL.
a

alisalimli

07/28/2021, 7:17 AM
but i don't wanna use managed database
i try using managed database and it's working,but i wanna use virtual machine
r

Ryan

07/28/2021, 7:21 AM
Where is the database deployed?
a

alisalimli

07/28/2021, 7:24 AM
in my virtual machine which is in digital ocean
did you ever use virtual machine ?
r

Ryan

07/28/2021, 7:46 AM
Then you need to use the IP of the virtual machine to connect to the database.
localhost
will not work.
a

alisalimli

07/28/2021, 11:26 AM
i am not using localhost
r

Ryan

07/28/2021, 11:30 AM
What are you passing then as the database URL?
Also the error you showed above is different. You can try it by adding
prisma
to dependencies and then check again.