knex migration:latest cannot connect while psql works fine


I need help figuring out why I can't run knex migration on my local machine
using. It seems that knex has some trouble connecting to the postgres database. Running knex migration:latest in the terminal gives me this error:



I'm using postgres on my local Macbook. This is my knexfile:



Running psql works fine:



I'm running the command in the same directory that knexfile.js is in. Thank you!



Your knexfile has an invalid syntax. You have not given the connection attribute there.



It should look like this:






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

芜湖市第十一中学

曲波 (足球运动员)

巴尔喀什湖