I am using go 1.23.2.
Made a module and uploaded on github. Successfully downlaoded it as well in a test folder
But when I use hugo mod vendor
I get an emply folder even though the module is present in cache folder and correctly downloaded.
When used HUGO_LOG_LEVEL=debug hugo mod vendor
it says no module.txt file ?
What to do ? Is this a bug or obviously not the expected behaviour! Any help will be appreciated
guess your are calling hugo mod vendor
in your module folder itself. And your module has no dependencies.
according to the docs at Use Hugo Modules | Hugo
hugo mod vendor
will write all the module dependencies to a_vendor
folder, which will then be used for all subsequent builds.
Thanks for the reply, I was using the module in another module where it was supposed to be downladed and with this command should have shown the contents in the _vendor folder but for some reasons. It was not.
What I realise haveing consulted with Github Co Pilot to commented out all my development configureation which was refering to the local folder. Once this configuration was out of the way, it downloaded the module with hugo mod git -u
command and successfully showed the contents in the _vendor
folder when hugo mod vendor
command was run.
oh yes, rember I had that a while ago. good to hear you get it solved.