# Is \`go get \<module\>\` required to import Hugo modules?

**URL:** <https://discourse.gohugo.io/t/is-go-get-module-required-to-import-hugo-modules/57562>\
**Category:** support\
**Tags:** modules\
**Created:** [September 18, 2026, 5:24am UTC](https://discourse.gohugo.io/t/is-go-get-module-required-to-import-hugo-modules/57562 "2026-09-18T05:24:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![extralongdivision](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/extralongdivision/32/26141_2.png) [@extralongdivision](https://discourse.gohugo.io/u/extralongdivision)\
**Post date:** [September 18, 2026, 5:24am UTC](https://discourse.gohugo.io/t/is-go-get-module-required-to-import-hugo-modules/57562/1 "2026-09-18T05:24:47Z")

</div>

From my interpretation of [the docs](https://gohugo.io/hugo-modules/use-modules/#import), the requirements to add a Hugo submodule, in my case [video-js](https://github.com/hugomods/video-js), are:

1. Make my project a Go module with `hugo mod init github.com/user/project`
2. Add the following to my config:

```yaml
module:
  imports:
  - path: github.com/hugomods/video-js

```

In reality I had to run `go get github.com/hugomods/video-js@latest` for Hugo to import a [video-js submodule](https://github.com/hugomods/video-js). Is this the correct workflow?

If so, I cannot find a suggestion to do this in the linked documentation. It implies that Hugo knows what to import if I specify the submodule path. I only got a hint to do otherwise so [this external site](https://scripter.co/hugo-modules-getting-started/) that [another confused user linked to in a forum thread](https://discourse.gohugo.io/t/need-help-to-get-https-github-com-hugo-mods-icons-up-and-running/44027/10). Note I, and the aforementioned confused user, am new to Go and may not have the intuition of other more experienced devs. I will happily make a pull request for more explicit documentation if `go get...` is required.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [September 18, 2026, 6:04am UTC](https://discourse.gohugo.io/t/is-go-get-module-required-to-import-hugo-modules/57562/2 "2026-09-18T06:04:28Z")

</div>

The answer is, “No.”

---

<div class="post-metadata">

**Author:** ![extralongdivision](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/extralongdivision/32/26141_2.png) [@extralongdivision](https://discourse.gohugo.io/u/extralongdivision)\
**Post date:** [September 18, 2026, 6:49am UTC](https://discourse.gohugo.io/t/is-go-get-module-required-to-import-hugo-modules/57562/3 "2026-09-18T06:49:42Z")

</div>

In trying to duplicate this error in a minimal case, I think I spotted my mistake. I was prompted to run `hugo mod tidy` which thus imported the submodule I wanted.

```bash
$ hugo mod init hugo-mvp
go: creating new go.mod: module hugo-mvp
hugo: to add module requirements and sums:
	hugo mod tidy
$ hugo mod tidy
go: no module dependencies to download
go: added github.com/hugomods/video-js v0.3.0
hugo: collected modules in 539 ms

```

I recall running this when originally trouble, but not sure why I got errors.  
Regardless, to put everything in one place, a reasonable sequence would be:

1. Run `hugo mod init my-project-name`
2. Add external submodule path to config module imports
3. run `hugo mod tiny`

---

<div class="post-metadata">

**Author:** ![bep](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/bep/32/3332_2.png) [@bep](https://discourse.gohugo.io/u/bep)\
**Post date:** [September 18, 2026, 8:05am UTC](https://discourse.gohugo.io/t/is-go-get-module-required-to-import-hugo-modules/57562/4 "2026-09-18T08:05:38Z")

</div>

The 2 first steps are enough. Hugo is automatically getting dependencies when you run e.g. `hugo`.

---

<div class="post-metadata">

**Author:** ![extralongdivision](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/extralongdivision/32/26141_2.png) [@extralongdivision](https://discourse.gohugo.io/u/extralongdivision)\
**Post date:** [September 18, 2026, 2:25pm UTC](https://discourse.gohugo.io/t/is-go-get-module-required-to-import-hugo-modules/57562/5 "2026-09-18T14:25:40Z")

</div>

Starting to think I just misconfigured my original config file as the first two steps are the only required in a fresh repo. Thank you, both for the clarification.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [September 20, 2026, 2:25pm UTC](https://discourse.gohugo.io/t/is-go-get-module-required-to-import-hugo-modules/57562/6 "2026-09-20T14:25:52Z")

</div>

Closed on September 20, 2026, 2:25pm UTC

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