Need help to get up and running

Hello, I want to use the hugo-mods/icons

I get this error message when calling hugo mod get -u

hugo mod get -u     
go: no module dependencies to download
go: invalid import path ""
Error: failed to get ["-d" "-u" ""]: failed to execute 'go [get -d -u]': failed to execute binary "go" with args [get -d -u]: go: invalid import path ""

go.mod shows:


go 1.19

hugo evn shows:

hugo v0.111.3+extended freebsd/amd64 BuildDate=2023-03-17T03:01:46Z+0000 VendorInfo=freebsd

go version shows:

go version go1.19.7 freebsd/amd64

Any idea what goes wrong?

Please post your site configuration file and the go.mod file from the root of your project.


go.mod content was posted already above.

Here is the content of my config.toml file (removed baseURL and title).

baseURL = 'xxx'
languageCode = 'en-us'
title = 'xxx'
enableRobotsTXT = "true"

  path = ""

	Victor_Hugo = "true"
	Focus_Keyword = ""
	subtitle = ""
name = "All posts"
url = "/posts/"
weight = 2

name = "Impress"
url = "/impress"
weight = 3

name = "Tags"
url = "/tags"
weight = 4

Yeah, I wanted to confirm this, because the go.mod file in the root of your project is wrong.


Your site module has the same name as the module you are importing.

And how should it be?

Give it a name unique to your project.

hugo mod init foo/bar

Looks like I lack some base understanding how modules work / what modules are …
Do you know a tutorial somewhere giving just some basic understanding?

Hugo modules are Go modules. Digital Ocean’s intro is pretty good:


sorry again me.

I still have some problems. I followed the steps here: GitHub - hugo-mods/icons: A Hugo icon system module that scales.

They write:

Initialize Hugo’s mod system on your site:

hugo mod init<username>/<your-repo>

I struggle already here. I don’t have my site on github but locally on my PC. What should it look like then?

I’m in my hugo website folder:
Should I do this then such as hugo mod init ~/hugo_site/icons

And what path should I put in my toml file?

This link helped me:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.