docsy: Docsy initial build fails when creating new site

Build error

[my-linux-machine]$ hugo -v
Start building sites … 
hugo v0.101.0-466fa43c16709b4483689930a4f9ac8add5c9f66+extended linux/amd64 BuildDate=2022-06-16T07:09:16Z VendorInfo=gohugoio
INFO 2022/06/24 19:57:32 syncing static files to /
INFO 2022/06/24 19:57:32 postcss: use config file /tmp/hugo_cache/modules/filecache/modules/pkg/mod/github.com/google/docsy@v0.3.0/postcss.config.js
INFO 2022/06/24 19:57:32 postcss: Unexpected identifier
Error: Error building site: POSTCSS: failed to transform "scss/main.css" (text/css): Unexpected identifier
Total in 312 ms

Versions

Hugo

hugo v0.101.0-466fa43c16709b4483689930a4f9ac8add5c9f66+extended linux/amd64 BuildDate=2022-06-16T07:09:16Z VendorInfo=gohugoio

Golang

go version go1.17.7 linux/amd64

I’m not even sure where to look for the source of the issue. I am also following the docs on how to start from scratch. I don’t think this is an npm package issue as I have the required modules installed globally. The issue for the missing npm which produces a similar issue was observed by myself, but I resolved that issue by installing what was missing. This site will execute under hugo server. Should I start pulling things from the example site until it works?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 28 (17 by maintainers)

Most upvoted comments

@mikeBoterf - Thanks for all that, but I still can reproduce it, and it’s working for @deining too.

One thing comes to mind: ensure that you’re using the latest LTS version of Node. I recall a project having problems when they were using an earlier version of Node. Can you update and give it another try?

I’ll post what I have and what it upgraded to. That is probably an issue.

@mikeBoterf - Thanks for all that, but I still can reproduce it, and it’s working for @deining too.

One thing comes to mind: ensure that you’re using the latest LTS version of Node. I recall a project having problems when they were using an earlier version of Node. Can you update and give it another try?

thanks for being patient @chalin

@chalin asked:

Can you try these instructions and let us know if they work for you too?

Yes, they work for me 😄.

Similar problem here trying to build a new site under MacOS and getting docsy on 2022-06-25 with git clone https://github.com/google/docsy.git

Start building sites … hugo v0.101.0+extended darwin/amd64 BuildDate=unknown Error: Error building site: TOCSS: failed to transform “scss/main.scss” (text/x-scss): “/Users/Shared/Projects/tangly-os-site/themes/docsy/assets/scss/main.scss:6:1”: File to import not found or unreadable: …/vendor/bootstrap/scss/bootstrap.

When using version 0.3.0 with

cd themes git clone –branch v0.3.0 https://github.com/google/docsy.git cd docsy git submodule update --init --recursive

everything works. It seems that a later commit introduced an error.