Deploy node-server with nitro

How did you solve it? I'm having this error in coolify, locally it's ok, but in production it gives this error
> start
> node .output/server/index.mjs

Listening on http://0.0.0.0:80
npm warn config production Use `--omit=dev` instead.
[h3] Implicit event handler conversion is deprecated. Use `eventHandler()` or `fromNodeMiddleware()` to define event handlers.  
     Handler: (event) => handler(event.req, event.context)
TypeError: Invalid URL
    at new URL (node:internal/url:816:29)
    ... 7 lines matching cause stack trace ...
    at async Server.toNodeHandle (file:///app/.output/server/index.mjs:1829:7) {
  cause: TypeError: Invalid URL
      at new URL (node:internal/url:816:29)
      at startRequestResolver (file:///app/.output/server/chunks/virtual/entry.mjs:854:17)
      at file:///app/.output/server/chunks/virtual/entry.mjs:441:13
      at AsyncLocalStorage.run (node:internal/async_local_storage/async_hooks:91:14)
      at file:///app/.output/server/chunks/virtual/entry.mjs:439:35
      at Object.handler (file:///app/.output/server/chunks/virtual/entry.mjs:378:20)
      at file:///app/.output/server/index.mjs:1489:43
      at async Object.handler (file:///app/.output/server/index.mjs:1558:19)
      at async Server.toNodeHandle (file:///app/.output/server/index.mjs:1829:7) {
    code: 'ERR_INVALID_URL',
    input: '/categorias'
  },
  status: 500,
  statusText: undefined,
  headers: undefined,
  data: undefined,
  body: undefined,
  unhandled: true
}


Web:
{
  "status": 500,
  "unhandled": true,
  "message": "HTTPError"
}
Was this page helpful?