datenanfragen / website

The Datenanfragen.de website including the request PDF generator and company information database
https://www.datenanfragen.de
MIT License
95 stars 125 forks source link

Investigate (and fix) Netlify build errors #95

Closed baltpeter closed 5 years ago

baltpeter commented 5 years ago

Recently, our branch builds on Netlify have started failing sometimes with Hugo complaining about parser errors.

Example of the errors:

6:35:01 PM: Building sites …
6:35:02 PM: WARNING: make non-relative ref/relref page reference(s) in page "/blog/hacktoberfest-2019.de.md" absolute, e.g. {{< ref "/blog/my-post.md" >}}
6:35:05 PM: ERROR 2019/10/04 18:35:05 parse error:4:19: expected comma character or an array or object ending
6:35:05 PM:     4:   "name": Bundesinstitut für Berufsbildung (BIBB),
6:35:05 PM:                          ^
6:35:05 PM: ERROR 2019/10/04 18:35:05 parse error:24:4: expected comma character or an array or object ending
6:35:05 PM:    24: <script type="application/ld+json">
6:35:05 PM:           ^
6:35:05 PM: ERROR 2019/10/04 18:35:05 parse error:6:12: expected comma character or an array or object ending
6:35:05 PM:     6:   "name": 1&amp;1 Internet SE,
6:35:05 PM:                   ^
6:35:05 PM: ERROR 2019/10/04 18:35:05 parse error:19:5: expected comma character or an array or object ending
6:35:05 PM:    19:
6:35:05 PM:            ^
6:35:05 PM: Total in 3533 ms
6:35:05 PM: Error: Error building site: failed to render pages: parse error:3:55: expected comma character or an array or object ending
6:35:05 PM:     3:     const SUPPORTED_LANGUAGES = {"en": "https:\/\/deploy-preview-94--datenanfragen.netlify.com\/en\/company\/comvel\/",};
6:35:05 PM:                                                              ^

I have not been able to reproduce this issue locally and it also doesn't seem to affect the production builds (yet?).

From looking at the error messages, this might be related to commits cefbce6 and aa60b4d. Not sure though.

Examples of failing build logs:

List of all build logs: https://app.netlify.com/sites/datenanfragen/deploys

zner0L commented 5 years ago

If it had anything to do with the commits it should happen in all builds, not just branch builds, right?

baltpeter commented 5 years ago

Fixed in #104.