apvarun / blist-hugo-theme

Blist is a clean and fast blog theme for your Hugo site.

Home Page:https://blist.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hugo server not coming up

oziomaoguine opened this issue · comments

Whenever i try to run the Hugo server after cloning the repository, I get this error

PS C:\Users\omo\Documents\hugo-demo> hugo server
Start building sites …
hugo v0.108.0-a0d64a46e36dd2f503bfd5ba1a5807b900df231d+extended windows/amd64 BuildDate=2022-12-06T13:37:56Z VendorInfo=gohugoio
Error: Error building site: POSTCSS: failed to transform "css/styles.css" (text/css): Error: Cannot find module 'postcss-import'
Require stack:

  • C:\Users\omo\Documents\hugo-demo\themes\blist\assets\css\postcss.config.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
    at Module._load (node:internal/modules/cjs/loader:841:27)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object. (C:\Users\omo\Documents\hugo-demo\themes\blist\assets\css\postcss.config.js:5:5)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at ModuleWrap. (node:internal/modules/esm/translators:169:29) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    'C:\Users\omo\Documents\hugo-demo\themes\blist\assets\css\postcss.config.js'
    ]
    }
    Built in 1605 ms

@Oziomaoguine007 This theme uses PostCSS to optimize the CSS output with Hugo (https://gohugo.io/hugo-pipes/postcss/)

You will need to run this to set it up. Make sure nodejs is installed in your machine
npm install postcss postcss-cli autoprefixer

commented

also having issue getting server to start .
getting following error:

  • npm installed packages :

npm install postcss postcss-cli autoprefixer up to date, audited 175 packages in 415ms 27 packages are looking for funding run npm fund` for details

found 0 vulnerabilities`

  • the running hugo :

Start building sites … hugo v0.111.3+extended linux/amd64 BuildDate=unknown Error: Error building site: POSTCSS: failed to transform "css/styles.css" (text/css): Input Error: Did not receive any STDIN Built in 937 ms

Tried many scenario even starting over from scratch without success!

even exampleSite gives same error :
hugo server --themesDir ../.. Start building sites … hugo v0.111.3+extended linux/amd64 BuildDate=unknown WARN 2023/04/10 19:09:56 The "twitter_simple" shortcode will soon require two named parameters: user and id. See "/themes/blist/exampleSite/content/en/blog/rich-content.md:24:1" WARN 2023/04/10 19:09:56 The "twitter_simple" shortcode will soon require two named parameters: user and id. See "/themes/blist/exampleSite/content/de/blog/rich-content.md:24:1" Error: Error building site: POSTCSS: failed to transform "css/styles.css" (text/css): Input Error: Did not receive any STDIN Built in 1020 ms

I am having the same error

error:

PS C:\Users\HP\Desktop\blist> hugo server                                                                                                            Watching for changes in C:\Users\HP\Desktop\blist\{archetypes,assets,content,data,layouts,static,themes}                                             Watching for config changes in C:\Users\HP\Desktop\blist\config.toml                                                                                 Start building sites …                                                                                                                               hugo v0.115.4-dc9524521270f81d1c038ebbb200f0cfa3427cc5+extended windows/amd64 BuildDate=2023-07-20T06:49:57Z VendorInfo=gohugoio                                                                                                                                                                          Built in 4822 ms                                                                                                                                     Error: error building site: POSTCSS: failed to transform "css/styles.css" (text/css). Check your PostCSS installation; install with "npm install postcss-cli". See https://gohugo.io/hugo-pipes/postcss/: binary with name "npx" not found  

my machine:
image