Closed ghost closed 4 years ago
Do you have a go.mod
file as in the example? https://github.com/bep/docuapi/blob/master/exampleSite/go.mod
This would be my go.mod
file
module github.com/bep/docuapi
go 1.13
require (
github.com/bep/empty-hugo-module v1.0.0 // indirect
github.com/jquery/jquery-dist v0.0.0-20191202185020-55b7d19f7bf1 // indirect
github.com/olivernn/lunr.js v2.3.8+incompatible // indirect
github.com/slatedocs/slate v2.4.0+incompatible // indirect
)
It seems good. This is the one I'm using: https://github.com/eine/issue-runner/blob/master/doc/go.mod. And this is a GitHub Actions workflow that may be useful for you to debug your issue in a "clean" environment: https://github.com/eine/issue-runner/blob/master/.github/workflows/doc.yml.
@eine thanks very much for your help!
I'm just starting with hugo and messing around a bit and docuapi looks /hot/ so I just wanted to try it real quickly, so I'm probably not going to spend a lot of time trying to figure it out yet (I can barely use hugo as it is), but I really appreciate your help and will probably come back to this in the future!
I am having the same issue, Error: module "github.com/slatedocs/slate" not found; either add it as a Hugo Module or store it in "/home/david/Documents/quickstart/themes".: module does not exist I dont find the way to make it work
@davidmarcielp I could probably vendor these dependencies, but currently you need Go + Hugo installed for this to work. I admit that the error message could be better.
I have updated to the latest versions
Hugo Static Site Generator v0.64.1-C327E75D linux/amd64 BuildDate: 2020-02-09T20:47:32Z
go version go1.10.4 linux/amd64
I have also launched npm install inside themes/slate but still the same issue:
Error: module "github.com/slatedocs/slate" not found; either add it as a Hugo Module or store it in "/home/david/Documents/Hugo/quickstart slate/themes".: module does not exist
@davidmarcielp, go 1.10 is EOL and it does not support go modules. Use 1.13 instead.
I'm still having this problem. I've got go 1.14
and hugo 0.70
and go.mod
in place as per eine.
➜ docs git:(data-gen) ✗ hugo
hugo: collected modules in 797 ms
Total in 802 ms
Error: module "github.com/slatedocs/slate" not found; either add it as a Hugo Module or store it in "/Users/nextdude/Google_Drive/epiphanous/medidata/git/meds-connected-devices/graphql/docs/themes".: module does not exist
➜ docs git:(data-gen) ✗ go version
go version go1.14.2 darwin/amd64
➜ docs git:(data-gen) ✗ hugo version
Hugo Static Site Generator v0.70.0/extended darwin/amd64 BuildDate: unknown
➜ docs git:(data-gen) ✗
@nextdude-mdsol, the workflow I referenced above is still working fine (it run some minutes ago). Hence, I would suggest to copy it and make the changes you need to adapt it to your use case:
macos-latest
instead of ubuntu-latest
.For anyone else having an issue this is what you need to do.
Created go.mod
with the following:
module github.com/bep/docuapi
go 1.12
require (
github.com/bep/empty-hugo-module v1.0.0 // indirect
github.com/jquery/jquery-dist v0.0.0-20190501211928-15bc73803f76 // indirect
github.com/olivernn/lunr.js v2.3.8+incompatible // indirect
github.com/slatedocs/slate v2.3.1+incompatible // indirect
)
Then in the config.toml make sure you have the following:
[module]
[module.hugoVersion]
[[module.imports]]
# We need one module import for Hugo to detect us as a Hugo Module.
path="github.com/bep/empty-hugo-module"
For anyone else having an issue this is what you need to do.
Created
go.mod
with the following:
Hi, newbie here. Where do I create the go.mod
?
go.mod
goes in the root directory alongside config.toml
.
I do the command
hugo server -t docuapi
and it installs some modules and then apparently tries to install the modeul for 'slatedocs/slate' but then fails with this erro
`Error: module "github.com/slatedocs/slate" not found; either add it as a Hugo Module or store it in "/Users/yangnom/www/quickstart/themes".: module does not exist'
I'm guessing because that reference doesn't exist anymore, but maybe I'm just dumb and doing something wrong...