Closed kh-ac closed 5 months ago
@timothycarambat
I did some research and i found that Prisma read environment vars from a .env file by default and in case we want to work with multiple .env files there is a configuration that has to be done.
So I had to add the following to the prisma:migrate
in order to run the yarn prisma:setup
command successfully:
If this is an issue that has to be solved, I am ready to work on it.
This was still the case after running yarn devSetup
?
https://github.com/Mintplex-Labs/vector-admin/blob/e7659c94476cb3329cb3ade9f5a49cc9915d99d3/devSetup.js#L11
Which is supposed to set up a server .env and have the variable in it (to a default string that can be modified)
This was still the case after running
yarn devSetup
?Which is supposed to set up a server .env and have the variable in it (to a default string that can be modified)
Yes, after running yarn dev:setup
script just the .env.development file is created as mentioned in here :
https://github.com/Mintplex-Labs/vector-admin/blob/e7659c94476cb3329cb3ade9f5a49cc9915d99d3/devSetup.js#L11-L16
But i think Prisma expects a .env by default not .env.something, i had to either create an .env file manually and write my environment variables or set the .env file for Prisma like that :
You are correct, i updated the dev:setup
to create both files now or else it is totally unclear that that backend/.env
is required. Of course, the user still needs to update the connection string to be correct, but it is less ambiguous now and the prisma
commands will use that connection in the backend/.env
now.
Hi, While trying to setup the project locally on my machine, I am getting this error when running the script:![Screenshot from 2024-01-07 18-47-40](https://github.com/Mintplex-Labs/vector-admin/assets/93795387/ea3bfa4b-2181-4223-ab63-247d0415b906)
yarn prisma:setup
Environment