HUGO

Can't add Bootstrap Module

I’m trying to add my first Module (hugo-mod-bootstrap-scss-v4) and I’m having some errors. I would prefer to comment on the thread but it’s closed (Working example of Hugo Modules and Bootstrap .scss files?).

I run the command

hugo mod init github.com/gohugoio/hugo-mod-bootstrap-scss-v4

On my config.toml file

[module]
[[module.imports]]
path = "github.com/gohugoio/hugo-mod-bootstrap-scss-v4"
[mounts]
source = "scss"
target = "assets/scss/bootstrap"

On module documentation says

The Bootstrap SCSS will be mounted in assets/scss/bootstrap , so you can then import either all:

But I don’t get those files mounted on those folders. So when I try on my theme.scss file to

@import "bootstrap/functions";

It fails

Error building site: TOCSS: failed to transform "scss/theme.scss" (text/x-scss): SCSS processing failed: file "stdin", line 3, col 1: File to import not found or unreadable: bootstrap/functions.

Where is your theme.scss file? if in /assets/ then the path to bootstrap is @import scss/bootstrap/scss/functions; Look at the repo you mount. that bootstrap target is the start folder for the whole bootstrap directory. scss is in folder scss, js files can be found in dist (or imported separate from js).