juliomrqz / statusfy

A Marvelous Open Source Status Page System
https://marquez.co/statusfy
Apache License 2.0
2.65k stars 198 forks source link

FATAL Invalid base URL: / #473

Open dbarzdys opened 4 years ago

dbarzdys commented 4 years ago

Bug report

Generate command results with an error when while trying to generate sitemap:

    FATAL  Invalid base URL: /                                                                                                                                              06:51:24

    at new URLImpl (node_modules/whatwg-url/lib/URL-impl.js:15:15)
    at Object.setup (node_modules/whatwg-url/lib/URL.js:317:14)
    at new URL (node_modules/whatwg-url/lib/URL.js:26:18)
    at node_modules/sitemap/dist/lib/sitemap.js:194:28
    at Array.forEach (<anonymous>)
    at Sitemap.toString (node_modules/sitemap/dist/lib/sitemap.js:188:19)
    at sitemap (node_modules/@statusfy/core/lib/content/sitemap.js:60:18)
    at async node_modules/@statusfy/core/client/modules/statusfy/index.js:124:21
    at async Nuxt.callHook (node_modules/hable/lib/hookable.js:50:7)
    at async Generator.generate (node_modules/@nuxt/generator/dist/generator.js:53:5)
    at async module.exports (node_modules/@statusfy/core/lib/generate.js:28:5)

Also, not sure why, but this command exits with 0 so I cannot fail my CI builds when it happens.

Version

Statusfy: 0.5.0 npm: 6.13.6 node: v13.7.0

Steps to reproduce

I'm getting this on freshly created new project on any machine.

welcome[bot] commented 4 years ago

Thanks for opening this issue, a maintainer will get back to you shortly! Be sure to follow the issue template! 🤓

open-collective-bot[bot] commented 4 years ago

Hey @dbarzdys :wave:, Thank you for opening an issue.

Check out our OpenCollective and consider backing us. Help us to continue developing this Amazing Project, we will appreciate it :heart:.

You can contribute from $2 :nerd_face:, less than a cup of coffee :coffee: :smiley:

https://opencollective.com/statusfy

PS.: We offer priority support for all backers. Don't forget to add priority label when you start backing us :smile:

aidenmitchell commented 4 years ago

I have this problem as well.

the-hotmann commented 4 years ago

FATAL Invalid base URL: /

Pls create (if not existing) a file called "config.js" in your root directory.

Fill it with:

module.exports = {
  title: 'Your name',
  description: 'Your description',
  baseUrl: 'https://sub.domain.de',
  analytics: {
    ga: 'UA-XXXXXXXXX-Y',
  },
  defaultLocale: 'de',
  locales: [
    { code: 'de', iso: 'de-DE', name: 'Deutsch' },
    { code: 'en', iso: 'en-US', name: 'English' }
  ],
  content: {
    frontMatterFormat: 'yaml',
    systems: [
      'cdn',
      'site-delivery',
    ]
  },
  theme: {
    scheduled: {
      position: 'aboveGlobalStatus'
    }
  },
  head: {
    link: [
      { rel: 'mask-icon', href: '/icons/safari-pinned-tab.svg', color: '#3e4e88' }
    ]
  }
}

Replace sub.domain.de with your actual FQDN (Domain) and run again.. this is not described in the docs.. I also wondered why not.

Also in the installation process the installer never asked for a FQDN/Domain. But in the end, this does not even matter as it completely gets ignored by the application. You can just paste a wrong domain and it will not trigger any warning and work just fine.. strange behaviour

Have fun