Error: can’t evaluate field ConCat in type interface

RE: https://discourse.gohugo.io/t/39016

I tried method 2 but get the error message

execute of template failed at <resources>: can’t evaluate field ConCat in type interface {} failed to render pages

ConCat seems like an easy function but apparently I miss something here - I literally copied your code.

resources.ConCat → No
resources.Concat → Yes

https://gohugo.io/hugo-pipes/bundling/

Not sure what you are trying to say JIm. Both resources are there and I literally copied the above script:

{{- $script := resources.GetRemote “https://cdn.jsdelivr.net/npm/@minimal-analytics/ga4/dist/index.js” }}
{{ $track := resources.Get “/js/track.js” | resources.ExecuteAsTemplate “js/track.js” . }}
{{- $analytics := slice $track $script | resources.Concat “js/analytics.js” | minify | fingerprint }}

You posted this error message:

can’t evaluate field ConCat in type interface
                        ^
          the second "C" must be lowercase

My first name is Joe, not Jim.

Thanks Joe, I missed that bit. I must confess I am always in awe of your reactions. Not a mean feat.

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