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.
New setup:
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.
I’m sorry but there is no link to a source code repository. I do not use Github, and the project is private as of now. I guess that complicates things. Thanks for clarifying.
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 …
something in your code and datas is different on the 2 machines
You’re right, but it makes no sense to me. Exact copy, over two ubuntu machines. Permissions of the relevant files identical. It’s a mystery that will not be solved now.
Thanks for your input.
Admin can close this and I’m going to get back to work (on Hugo).
The fact that the project does not generate in v0.76.5 on your new machine whereas it does generate in your old one means that something required by your project’s templates is not there.
Are you relying on external dependencies? Like for instance NPM. Could it be that such an external dependency is missing from the new machine?
Again your issue is not something we can help you with, because we cannot know what’s amiss without seeing the source code of the project.