Closed earmellin closed 4 weeks ago
Hi @earmellin,
Ensure you're working on the default branch, which is develop for now. Also, be sure to pull the latest updates from that branch.
@vladutstoica I've switched to develop and pulled the latest updates committed yesterday, but the error is the same
I have the following error when running yarn setup
:
? Enter the database name my-db
error: Unable to establish database connection because of the following error
error: SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string
Error: SASL: SCRAM-SERVER-FIRST-MESSAGE: client password must be a string
I think the problem might be that setup overwrites .env file with DB_NAME=medusa-backend, even when i put "my-db" in the prompt. Because when i open it i see it was changed back to "medusa-backend".
I was missing password in the database url... It was like this by default, but it lacks password ":postgres":
DATABASE_URL=postgres://postgres@localhost/$DB_NAME
ok it works, I misunderstood the point where yarn setup should be launched, my mistake sorry :( just a suggestion: it would be useful to be able to indicate the port of the PostgreSQL server in addition to the name of the db in the setup procedure
just a suggestion: it would be useful to be able to indicate the port of the PostgreSQL server in addition to the name of the db in the setup procedure
You can do this by appending :PORT_NUMBER to the DATABASE_URL environment variable, like so: postgres://postgres@localhost:5432.
The format should be: postgres://[user[:password]@][host][:port][/dbname].
Yes indeed, looking in the code for the dbname variable I had gone to modify that url to install the environment. Maybe at the initial setup level a parameter also for the port would be more practical, just a suggestion. Thanks for your work!
Hello, I'm trying your starter but if I run:
yarn install && yarn setup
as indicated I get an error message:
Usage Error: Couldn't find a script named "setup".
and I actually don't see any setup scripts defined in the package.json