Bulma css module required by hugo-fresh theme is not found

I’m trying to build a hugo site with the hugo-fresh theme (GitHub - StefMa/hugo-fresh: Hugo Fresh Theme).

Following the quickstart instructions, I get this error message

Error: command error: failed to load modules: module “GitHub - jgthms/bulma: Modern CSS framework based on Flexbox” not found in “/Users/mm/janeausten250/themes/github.com/jgthms/bulma”; either add it as a Hugo Module or store it in “/Users/mm/janeausten250/themes”.: module does not exist

Bulma is a css framework used by the hugo-fresh theme. I previously did a global install of bulma with npm install bulma but I’m unsure what else I’d need to do. I’m confused why the Hugo error message is telling me to install a css module in the themes folder and, if that’s correct, how I’m supposed to do that.

That theme includes Bulma as a Hugo Module. I’m not sure how your project looks like, but in short:

  1. You need Go installed.
  2. Your project also needs to be initialized as a Hugo module (e.g. hugo mod init foo)

Thank you for the reply. I did
hugo mod init github.com/mikemitchellwebdev/janeausten250

There is no output in the folder.
Question 1: Should there be a go.mod file after running hugo mod init? There is no output in the folder. I’m using go.1.22.

Question 2

I found a thread (Error: module "github.com/hugo-mods/release-notify" not found) which linked to an example config.yaml

module:
imports:

Following that example, I created a config.yaml manually and put this in it

module:
imports:

running hugo server

Error: command error: failed to load modules: module “GitHub - jgthms/bulma: Modern CSS framework based on Flexbox” not found in “/Users/mm/janeausten250/themes/github.com/jgthms/bulma”; either add it as a Hugo Module or store it in “/Users/mm/janeausten250/themes”.: module does not exist

Question 3: How do I add bulma as a module?

Thank you

Yes.

As to your other questions … I tried to set up a site using hugo-fresh now, and got one up and running in less than a minute with no errors.

So if you get some “module does not exist error”, don’t try to copy things manually. The module system that’s backing Hugo Modules (Go Modules) is much more robust than NPM … Once you understand how it works.

Thank you. Can you post your exact instructions or please tell me what I’m doing wrong?

The problem might be that I’m trying to use both the quickstart guide which doesn’t include modules instructions, so I’m doing something wrong obviously as I try to combine the two. This is what I’m doing:

hugo new site janey
cd janey
hugo mod init janey( output- go: creating new go.mod: module janey/ go: to add module requirements and sums:/go mod tidy )
git init
git submodule add GitHub - StefMa/hugo-fresh: Hugo Fresh Theme themes/hugo-fresh
echo “theme = ‘hugo-fresh’” >> hugo.toml
hugo mod get -u

go: no module dependencies to download

hugo: downloading modules …

go: github.com/jgthms/bulma@upgrade: git for-each-ref --format %(refname) refs/tags --merged fc7db1b2044a860eed3426ab68db1cb9729c4ddb in /Users/mm/Library/Caches/hugo_cache/modules/filecache/modules/pkg/mod/cache/vcs/d381d0f3caffe75b1b94deae28088c0c4a0812525bf874836625587a78374f3b: exit status 129:

My hugo.toml file looks very strange as the syntax for specifying modules

baseURL = ‘https://example.org/
languageCode = ‘en-us’
title = ‘My New Hugo Site’
theme = ‘hugo-fresh’

[module]
[[module.imports]]
path = ‘GitHub - jgthms/bulma: Modern CSS framework based on Flexbox

ok some docs are tl;tr; but this one is brief and complete

give it a try

2 Likes

Thank you. I didn’t see those instructions on your github account.

@irkode not sure if this is your theme but this sentence in the “deep modification guide” doesn’t make much sense to me:

In case you want to make deep modifications of this theme (like changing the colors) you have to add the theme as an git submodule rather than as a hugo module.

I would recommend to keep it as a module and do mods via file overrides or SCSS variables.

Definitelynot my theme.

Just a quick search for the instructions

And ur right, looks uncomfotable