wangchucheng / hugo-eureka

Eureka is a feature-rich and highly customizable Hugo theme.
https://www.wangchucheng.com/en/docs/hugo-eureka/
Apache License 2.0
927 stars 193 forks source link

Issues with PostCSS #147

Closed brunomiguel closed 3 years ago

brunomiguel commented 3 years ago

Describe the bug When building the static content, PostCSS displays an error and doesn't build the CSS (even with the latest theme commit)

To Reproduce run 'hugo'

Expected behavior

Builds the CSS

Environment

Additional context The error:

Error: Error building site: POSTCSS: failed to transform "css/eureka.css" (text/css): Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './lib/node' is not defined by "exports" in /home/brunomiguel/projectos/fibrohell/fibrohell.github.io/themes/eureka/node_modules/postcss/package.json
    at new NodeError (node:internal/errors:371:5)
    at throwExportsNotFound (node:internal/modules/esm/resolve:429:9)
    at packageExportsResolve (node:internal/modules/esm/resolve:683:3)
    at resolveExports (node:internal/modules/cjs/loader:482:36)
    at Function.Module._findPath (node:internal/modules/cjs/loader:522:31)
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:919:27)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Module.require (node:internal/modules/cjs/loader:999:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/home/brunomiguel/projectos/fibrohell/fibrohell.github.io/themes/eureka/node_modules/tailwindcss/lib/util/processPlugins.js:12:36) {
  code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
brunomiguel commented 3 years ago

It was an issue with a globally installed npm module. It's fixed now

vk0xOrg commented 2 years ago

I have a similar issue. If it's not related sorry for necrobumping, then will make another issue. So, while trying to build static site the following error arise:

Error: Error building site: POSTCSS: failed to transform "css/eureka.css" (text/css): resource "css/project1/css/eureka.css_fc3f76d7bee2760c3a903059afc3d9b2" not found in file cache

I've found that if baseURL is set to "/", then everything works as expected; if it is set to "https://user.github.io/project1" then the build fails and displays the above error.

Tried npm i -g postcss-cli autoprefixer locally as well as a GitHub workflow in actions but neither worked.

What else could be done?