ashlessscythe / timeoff-alien

Simple yet powerful absence management software for small and medium size business (community edition)
https://TimeOff.Management
MIT License
3 stars 2 forks source link

Cant start app sequelize error #29

Closed joshdinsdale closed 4 days ago

joshdinsdale commented 1 month ago

Hi All

I am having trouble starting the app, i am getting the following error:

TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received undefined at Url.parse (node:url:171:3) at Object.urlParse [as parse] (node:url:142:13) at new Sequelize (/opt/timeoff-management/node_modules/sequelize/lib/sequelize.js:187:28) at Object.<anonymous> (/opt/timeoff-management/lib/model/db/index.js:34:19) at Module._compile (node:internal/modules/cjs/loader:1546:14) at Object..js (node:internal/modules/cjs/loader:1689:10) at Module.load (node:internal/modules/cjs/loader:1318:32) at Function._load (node:internal/modules/cjs/loader:1128:12) at TracingChannel.traceSync (node:diagnostics_channel:315:14) at wrapModuleLoad (node:internal/modules/cjs/loader:218:24) at Module.require (node:internal/modules/cjs/loader:1340:12) at require (node:internal/modules/helpers:141:16) at Object.<anonymous> (/opt/timeoff-management/app.js:81:21) at Module._compile (node:internal/modules/cjs/loader:1546:14) at Object..js (node:internal/modules/cjs/loader:1689:10) at Module.load (node:internal/modules/cjs/loader:1318:32) at Function._load (node:internal/modules/cjs/loader:1128:12) at TracingChannel.traceSync (node:diagnostics_channel:315:14) at wrapModuleLoad (node:internal/modules/cjs/loader:218:24) at Module.require (node:internal/modules/cjs/loader:1340:12) at require (node:internal/modules/helpers:141:16) at Object.<anonymous> (/opt/timeoff-management/bin/wwww:4:13) { code: 'ERR_INVALID_ARG_TYPE' }

I am not quite sure where to set this url variable..

Thanks Josh

ashlessscythe commented 3 weeks ago

Hey Josh,

Looks like the app’s crashing because it’s not getting a URL where it expects one. This usually happens if the URL variable is missing or misconfigured.

Here’s what you can try:

Check your .env file – Make sure the database URL is there and properly formatted. It should look something like:

DATABASE_URL="postgres://user:pass@host:port/dbname"

Look at recent updates – If you haven't already, pull the public branch. There's some changes to .env.example or docker-compose.yaml. They usually have example configurations, so double-check those.