Can't get blist theme to work with hugo 0.89.4-extended

I’m new to hugo. I’d like to use the blist theme. I can’t get the example site to build and I can’t tell whether this is a bug in the theme, in dependencies, or my installation.

Here’s what I’ve done (ubuntu 21.04):

git clone https://github.com/apvarun/blist-hugo-theme.git blist
cp blist/package.json blist/exampleSite/package.json
cd blist/exampleSite
npm install
  • run hugo server --themesDir ../.., for which I get
Error: Error building site: POSTCSS: failed to transform "css/styles.css" (text/css): Error: Cannot find module '@fullhuman/postcss-purgecss'
Require stack:
- /home/reece/tmp/blist/assets/css/postcss.config.js
- /home/reece/tmp/blist/exampleSite/node_modules/lilconfig/dist/index.js
- /home/reece/tmp/blist/exampleSite/node_modules/postcss-load-config/src/index.js
- /home/reece/tmp/blist/exampleSite/node_modules/postcss-cli/index.js
- /home/reece/tmp/blist/exampleSite/node_modules/postcss-cli/bin/postcss
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:815:15)
    at Function.Module._load (internal/modules/cjs/loader.js:667:27)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at Object.<anonymous> (/home/reece/tmp/blist/assets/css/postcss.config.js:3:18)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19) {
  code: 'MODULE_NOT_FOUND',

I’ve tried npm install -g and using the extended snap package, all with the same result. I’ve also tried extended/edge from snap, and I’ve tried install postcss, pugecss, and postcss-purgcss.

Thanks for any help.

No errors on Ubuntu 20.04.3 LTS:

sudo snap install hugo --channel=extended/stable
git clone https://github.com/apvarun/blist-hugo-theme.git blist
cp blist/package.json blist/exampleSite/package.json
cd blist/exampleSite
npm install
/snap/bin/hugo server --themesDir ../..
uname -m        # x86_64
lsb_release -d  # Ubuntu 20.04.3 LTS

Also, please post the results of these commands:

grep "nodejs" /snap/hugo/current/snap/manifest.yaml
hugo version

And, are you running these commands from within an IDE (e.g., MS Visual Studio Code integrated terminal)?

Now working.

Eons ago I followed advice is node.js - Install NPM into home directory with distribution nodejs package (Ubuntu) - Stack Overflow.

Changing the invocation to NODE_PATH= hugo server --themesDir ../.. was enough to make it work.

So, to be clear: blist is now working for me with hugo 0.89.4+extended from snap extended/stable on Ubuntu 21.04.

Thanks for your help.