Start building sites …
hugo v0.128.1+extended darwin/arm64 BuildDate=2024-07-02T06:46:41Z VendorInfo=brew
ERROR TOCSS: failed to transform "/hb/modules/search/index.scss" (text/x-scss): "/Users/fefendi/Library/Caches/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hbstack/search@v0.2.2/assets/hb/modules/search/index.scss:2:1": File to import not found or unreadable: /Users/fefendi/Library/Caches/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hugomods/search@v0.14.0/assets/search/scss/index.scss.
ERROR TOCSS: failed to transform "hb/scss/index.scss" (text/x-scss): "/Users/fefendi/Library/Caches/hugo_cache/modules/filecache/modules/pkg/mod/github.com/hbstack/hb@v0.12.3/assets/hb/scss/index.tmpl.scss:4:1": File to import not found or unreadable: /Users/fefendi/Library/Caches/hugo_cache/modules/filecache/modules/pkg/mod/github.com/twbs/bootstrap@v5.3.3+incompatible/scss/_functions.scss.
Troubleshooting of this was very painful, it took many hours trying to isolate malformed file (for example).
Finally I was able to shrank large project to smaller one:
hugo v0.128.1+extended darwin/arm64 BuildDate=2024-07-02T06:46:41Z VendorInfo=brew
| EN
-------------------+--------
Pages | 38815
Paginator pages | 4244
Non-page files | 1
Static files | 3
Processed images | 9
Aliases | 12755
Cleaned | 0
Built in 134768 ms
Next step is to add single page to it, abc/index.md
, containing “Hello, World!” sentence, and project fails with the command hugo server --renderToMemory
! So that I started to suspect web server limitations and decided to run hugo
which will only compile files:
Start building sites …
hugo v0.128.1+extended darwin/arm64 BuildDate=2024-07-02T06:46:41Z VendorInfo=brew
| EN
-------------------+--------
Pages | 38816
Paginator pages | 4244
Non-page files | 1
Static files | 3
Processed images | 9
Aliases | 12755
Cleaned | 0
Total in 151853 ms
Note, number of pages increased by 1. And it was built sucessfully!
So, it is limitations of embedded web server. But then why do we have such a strange error message, “failed to transform SCSS” (the file is there!); also, do we have such limitations documented anywhere? Error message could provide more clue.
This also explains why I don’t have such issues at Netlify.
I tried to use “segments” but I don’t understand it yet…