So I’m setting up an existing project on a new computer.
Copied old project folder onto the new computer.
I get this:
ERROR 2020/11/07 01:32:26 render of "page" failed: "/home/username/Documents/hugo/project_name/layouts/fragments/baseof.html:14:55": execute of template failed: template: fragments/single.html:14:55: executing "fragments/single.html" at <resources.ExecuteAsTemplate>: error calling ExecuteAsTemplate: type <nil> not supported in Resource transformations
I’ve noticed (on this website) this error occurs when dealing with CSS under certain conditions.
The “offending” bit of code from the Mainroad theme:
I’ve checked the Mainroad source, and I’ve changed nothing there.
Hugo Static Site Generator v0.78.1/extended linux/amd64 BuildDate: unknown
The project compiles fine on my old computer:
Hugo Static Site Generator v0.76.5 linux/amd64 BuildDate: 2020-10-14
Any ideas? Thanks.
P.S. I should add that when I installed hugo, I first did sudo apt install hugo then uninstalled it (remove) because it was suggested to install it using homebrew. The version I’m using was installed using brew.
P.P.S. Also, I made a new project (hugo site new whatever) and added the Mainroad theme with no other content, and it worked fine. So the “offending” code isn’t really the problem.
I did share one snippet of code. That is the “offending” line, and the code is identical to functioning Mainroad code, and identical to code that functions on v0.76.5.
Can you be more specific about what you have in mind?
I’m really fishing for anything having to do with either the version changes, installation issues (is brew the wrong way?) or help getting more specific error messages so I can track this thing down myself.
Obviously I’m a little wary about updating Hugo on my other computer right now.
So I uninstalled the new version and installed a .deb of v0.76.5 and the hugo issue remains. This means … what? For the sake of my sanity, and due to time pressure, I’m just going to skip installing it on this machine.
I’ll worry about this, if it’s a worry at all, on my next project.
As previously said above, without your project, we are not crystal glass wizards to help further.
But if it is the same Hugo version on the 2 machines, then something in your code and datas is different on the 2 machines …