Hugo Concat error

Everything on a local machine building well for this Hugo site - everything on latest versions, but Netlify deployment fails which I can’t work out. Any insight would be good please for the part:

<resources.Concat>: error calling Concat: slice []interface {} not supported in concat

In context:

8:30:19 PM: ERROR 2021/02/10 20:30:19 render of "page" failed: "/opt/build/repo/layouts/_default/baseof.html:29:70": execute of template failed: template: _default/single.html:29:70: executing "_default/single.html" at <resources.Concat>: error calling Concat: slice []interface {} not supported in concat

Can you share your single.html?

I’ve done a bit more digging and the issue is with Hugo Module Mounts, the single.html reference is just the point of failure.

in config.toml:

[[module.mounts]]
source = "node_modules/macy/dist/macy.js"
target = "assets/js/macy.js"

the source is present in the repo, but I’m wondering if having node_modules at root is the issue as I have another build which is pretty identical, but it runs inside a /theme folder

If macy.js is placed manually in assets/js and the config.toml mount removed… Netlify build works.

In baseof.html calling these looks like this:

{{ $macyjs := resources.Get "js/macy.js" }}
{{ $macyjsconfig := resources.Get "js/macy.config.js" }}
{{ $concatalljs := slice $menuconfig $macyjs $macyjsconfig | resources.Concat "js/bundle-all.js" | resources.Minify }}
{{ $secureallJS := $concatalljs | resources.Fingerprint "sha512" }}