Build error on Linux; same site builds fine on MacOS

Hello!

I’m new to Hugo and in need of some direction. I use both MacOS and Linux environments and my new Hugo site builds fine on my mac, but not on linux. On the latter I get this error:

Start building sites … 
ERROR 2021/03/18 10:34:50 render of "home" failed: "/home/micah/Dev/personal-site/layouts/_default/baseof.html:22:48": execute of template failed: template: _default/list.html:22:48: executing "_default/list.html" at <minify>: wrong type for value; expected resources.ResourceTransformer; got resource.Resource

The error is repeated for most of the pages in my layouts/_default directory.

I see that the error is related to the minify method; I’m just not sure what about it is incorrectly configured; especially since the site builds with no errors on my mac. I’ve read the docs and searched here in support to no avail.

I’m hopping there’s just a setting I need to change on my Linux config, etc. Any direction would be appreciated.

Here’s my site repo: GitHub - micahmount/personal-site

Here’s my Hugo env on both devices:

MacOS (builds fine):

hugo v0.81.0+extended darwin/amd64 BuildDate=unknown
GOOS="darwin"
GOARCH="amd64"
GOVERSION="go1.16"

Linux (Ubuntu Xenial)

hugo v0.81.0+extended linux/amd64 BuildDate=unknown
GOOS="linux"
GOARCH="amd64"
GOVERSION="go1.16"

Just for good measure here’s my config for both environments:

Hugo config: Linux
baseurl = "/"
builddrafts = false
buildexpired = false
buildfuture = false
cachedir = "/tmp/hugo_cache/"
canonifyurls = false
cleandestinationdir = false
debug = false
defaultcontentlanguage = "en"
defaultcontentlanguageinsubdir = false
disablealiases = false
disablefastrender = false
disablelivereload = false
disablepathtolower = false
disqusshortname = ""
enableemoji = false
enablegitinfo = false
enableinlineshortcodes = false
enablemissingtranslationplaceholders = false
environment = "production"
footnoteanchorprefix = ""
footnotereturnlinkcontents = ""
forcesyncstatic = false
googleanalytics = ""
hascjklanguage = false
ignorecache = false
ignorefiles = []
indexes = map[category:categories tag:tags]
languagecode = "en-us"
menus = map[main:[map[identifier:blog name:blog url:/blog/ weight:100] map[identifier:projects name:projects url:/projects/ weight:200] map[identifier:resume name:resume url:/resume/ weight:300]]]
newcontenteditor = ""
paginate = 10
paginatepath = "page"
params = map[author:Micah Mount avatar:img/profile.png custom_css:[] custom_js:[] description:Reflections on becoming a Software Developer social:map[email:me@micahmount.com github:micahmount linkedin:micahmount rss:/blog/index.xml twitter:micahmount]]
permalinks = map[post:/:year/:month/:day/:slug]
pluralizelisttitles = true
publishdir = "public"
pygmentscodefencesguesssyntax = false
relativeurls = false
removepathaccents = false
resourcedir = "resources"
rsslimit = -1
sectionpagesmenu = ""
sitemap = {ChangeFreq: Priority:-1 Filename:sitemap.xml}
summarylength = 70
taxonomies = map[category:categories tag:tags]
theme = "sustain"
themesdir = "themes"
timeout = "30s"
title = "Micah Mount"
titlecasestyle = "AP"
uglyurls = false
verbose = false
watch = false
workingdir = "/home/micah/Dev/personal-site"
Hugo config: MacOs
baseurl = "/"
builddrafts = false
buildexpired = false
buildfuture = false
cachedir = "/var/folders/sp/_nt9hdx92575vjn871lyk17c0000gn/T/hugo_cache/"
canonifyurls = false
cleandestinationdir = false
debug = false
defaultcontentlanguage = "en"
defaultcontentlanguageinsubdir = false
disablealiases = false
disablefastrender = false
disablelivereload = false
disablepathtolower = false
disqusshortname = ""
enableemoji = false
enablegitinfo = false
enableinlineshortcodes = false
enablemissingtranslationplaceholders = false
environment = "production"
footnoteanchorprefix = ""
footnotereturnlinkcontents = ""
forcesyncstatic = false
googleanalytics = ""
hascjklanguage = false
ignorecache = false
ignorefiles = []
indexes = map[category:categories tag:tags]
languagecode = "en-us"
menus = map[main:[map[identifier:blog name:blog url:/blog/ weight:100] map[identifier:projects name:projects url:/projects/ weight:200] map[identifier:resume name:resume url:/resume/ weight:300]]]
newcontenteditor = ""
paginate = 10
paginatepath = "page"
params = map[author:Micah Mount avatar:img/profile.png custom_css:[] custom_js:[] description:Reflections on becoming a Software Developer social:map[email:me@micahmount.com github:micahmount linkedin:micahmount rss:/blog/index.xml twitter:micahmount]]
permalinks = map[post:/:year/:month/:day/:slug]
pluralizelisttitles = true
publishdir = "public"
pygmentscodefencesguesssyntax = false
relativeurls = false
removepathaccents = false
resourcedir = "resources"
rsslimit = -1
sectionpagesmenu = ""
sitemap = {ChangeFreq: Priority:-1 Filename:sitemap.xml}
summarylength = 70
taxonomies = map[category:categories tag:tags]
theme = "sustain"
themesdir = "themes"
timeout = "30s"
title = "Micah Mount"
titlecasestyle = "AP"
uglyurls = false
verbose = false
watch = false
workingdir = "/Users/micah/dev/personal/personal-site"

Many thanks in advance for the help! :heart:

My OS: Ubuntu 20.04.2 LTS

git clone --recurse-submodules https://github.com/micahmount/personal-site
cd personal-site/
hugo

Results:

Start building sites … 

                   | EN  
-------------------+-----
  Pages            | 24  
  Paginator pages  |  0  
  Non-page files   |  0  
  Static files     |  2  
  Processed images |  0  
  Aliases          |  0  
  Sitemaps         |  1  
  Cleaned          |  0  

Total in 34 ms
1 Like

I suspect that Hugo can’t read themes/sustain/assets/css/main.css. Verify that the file exists, and verify permissions.

I suspect you cloned the repo to your Linux box and forgot the --recurse-submodules flag.

@jmooring you’re completely right–I totally forgot to --recurse-submodules. That fixed the issue. Thank you VERY much!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.