Question

The "url" argument must be of type string. Received undefined

I am receiving this error during the deployment of my express/node app using App platform. Couldn’t figure what is the problem!

config.json:

{
  "development": {
    "username": "postgres",
    "password": "10300",
    "database": "weblogin",
    "host": "127.0.0.1",
    "dialect": "postgres",
    "logging": false
  },
  "test": {
    "username": "root",
    "password": null,
    "database": "database_test",
    "host": "127.0.0.1",
    "dialect": "mysql"
  },
  "production": {
    "use_env_variable": "DATABASE_URL"
  }
}

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hi there,

It sounds like the DATABASE_URL env variable is not defined. Have you added a bind variable to the app’s environment variables?

The variable should look as follows:

DATABASE_URL=${db.DATABASE_URL}

Best,

Bobby