Hugo date error

I was firing up a Gitlab Pages site using Hugo today and ran across the following error

Failed to get translated string for language "en" and ID "postedOnDate": template: :1:13: executing "" at <.Count>: can't evaluate field Count in type string

Though the magic of grep I found two locations for the offender:

/themes/beautifulhugo/i18n/ja.yaml /themes/beautifulhugo/i18n/en.yaml

You’ll find the following bit of code here

- id: postedOnDate  translation: "Posted on {{ .Count }}"

Remove Count from the setting as shown in the following snippet and you’ll be golden

- id: postedOnDate  translation: "Posted on {{ . }}"

A copy of Firefox is already open. Only one copy of Firefox can be open at a time.

I have seen this error when my Mac has auto rebooted for some reason. Firefox does not show up as a running process and can’t be found using the Force Quit… feature so what to do? It’s time to drop into a terminal session to go looking for a rogue child process that is keeping Firefox from opening.

(⎈ default)➜ ~ ps -ax | grep fire 1820 ?? 312:27.66 /Applications/Firefox.app/Contents/MacOS/firefox

There is the culprit and it needs to be killed

(⎈ default)➜ ~ kill -9 1820

Firefox should now launch without an issue. If for some reason that doesn’t get it done there are two alternative things to try:

  • delete the .parentlock file

  • delete an unknown identity

To delete an unknown identity run the following command at a terminal session

(⎈ default)➜ ~ /Applications/Firefox.app/Contents/MacOS/firefox-bin -P

You should see a popup window that displays the identities known to Firefox. Delete the one(s) you didn’t create and restart Firefox.