Report this

What is the reason for this report?

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

Posted on June 1, 2022

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"
  }
}


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!

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.