Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added module is not found when building site #18

Closed
Int-Circuit opened this issue Dec 20, 2024 · 3 comments
Closed

Added module is not found when building site #18

Int-Circuit opened this issue Dec 20, 2024 · 3 comments

Comments

@Int-Circuit
Copy link

When adding and downloading the bootstrap module to my site , hugo complains that the bootstrap resource is not found.

site is initialised as a module.

module.toml

[[module.imports]]
path = "github.com/gohugoio/hugo-mod-bootstrap-scss/v5"

go.mod

module gitlab.com/pages/hugo

go 1.20

require (
	github.com/gohugoio/hugo-mod-bootstrap-scss/v5 v5.20300.20200 // indirect
	github.com/theNewDynamic/gohugo-theme-ananke v0.0.0-20230203204610-a1a99cf12681 // indirect
)

hugo version: 0.140

mathis@t14-fedora:~/Documents/Git/Freecad-library_Viewer$ hugo
Start building sites … 
hugo v0.140.0-3f35721fb2c75a1f7cc5a7a14400b66e73d4b06e+extended linux/amd64 BuildDate=2024-12-17T14:20:55Z VendorInfo=gohugoio

ERROR TOCSS: failed to transform "/scss/main.scss" (text/x-scss): "/home/mathis/Documents/Git/Freecad-library_Viewer/assets/scss/main.scss:1:1": File to import not found or unreadable: bootstrap/bootstrap.
Total in 28 ms
Error: error building site: TOCSS: failed to transform "/scss/main.scss" (text/x-scss): "/home/mathis/Documents/Git/Freecad-library_Viewer/assets/scss/main.scss:1:1": File to import not found or unreadable: bootstrap/bootstrap.
@bep
Copy link
Member

bep commented Dec 20, 2024

Try to see if https://github.com/gohugoio/hugo-mod-bootstrap-scss/tree/main/exampleSite builds (I just tested it and that builds fine on my MacBook).

@razonyang
Copy link
Contributor

razonyang commented Dec 20, 2024

I think it is a configuration issue.

# module.toml
[[module.imports]]
path = "github.com/gohugoio/hugo-mod-bootstrap-scss/v5"

You can either putting the module config to hugo.toml

# hugo.toml
[[module.imports]]
path = "github.com/gohugoio/hugo-mod-bootstrap-scss/v5"

Or removing the prefix from module.toml if you're using Configuration Directory.

# module.toml
[[imports]]
path = "github.com/gohugoio/hugo-mod-bootstrap-scss/v5"

@Int-Circuit
Copy link
Author

It was indeed a config issue, thx for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants