I am trying to wrap my head around something here. When I run a hugo new command it does what it does, but not without first updating the modules of my system (based on whatever rules it uses to check for updates).
I wonder, why is it important to do that at that point? Normally when running hugo new I have a site that either is running with hugo server or “recently” ran a built or deploy. Would it make sense to remove these checks at that point (new site, new post, new install)? It’s not like any updated module could influence the process of parsing an archetype file and create some content files. Is it?
A module can be your main project or a smaller module providing one or more of the 7 component types defined in Hugo: static , content , layouts , data , assets , i18n , and archetypes .
In most of my own usages of hugo new all modules are up to date. I never run hugo new without NOT having the server up already. That is my pain point because the most time that whole lookup takes quite some time even if there is nothing to update.Having a way to disable that in hugo new might be good, but I am pretty sure that is not something easy to integrate.
When I run hugo server for the first time today, I see hugo: downloading modules…, and the site build fails with an error of 2022/03/16 19:01:59 js.Build failed: after attempting to debug multiple files, I finally tried “hugo mod clean” and everything worked normally.
Like in npm packages, I’d like to have some control over the Hugo module. This random download is a disaster. I’m not sure why this download occurs at random.