is there any problem if i install prisma dependenc...
# orm-help
a
is there any problem if i install prisma dependency as normal dependecy(not dev dependency i mean)
r
No there isn’t any problem. Only thing your docker image might get a bit larger.
a
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
Where are you running this?
a
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.js31912) at ChildProcess.emit (events.js37528) at maybeClose (internal/child_process.js105516) at Process.ChildProcess._handle.onexit (internal/child_process.js2885) (Use
node --trace-warnings ...
to show where the warning was created)
r
Is this running in your Docker image?
a
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
You can. Just point it to the managed database URL.
a
but i don't wanna use managed database
i try using managed database and it's working,but i wanna use virtual machine
r
Where is the database deployed?
a
in my virtual machine which is in digital ocean
did you ever use virtual machine ?
r
Then you need to use the IP of the virtual machine to connect to the database.
localhost
will not work.
a
i am not using localhost
r
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.