Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hugo server not coming up #88

Open
oziomaoguine opened this issue Dec 10, 2022 · 3 comments
Open

Hugo server not coming up #88

oziomaoguine opened this issue Dec 10, 2022 · 3 comments

Comments

@oziomaoguine
Copy link

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
@apvarun
Copy link
Owner

apvarun commented Dec 25, 2022

@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

@scan-dev
Copy link

scan-dev commented Apr 10, 2023

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

@mansoorbarri
Copy link

mansoorbarri commented Jul 28, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants