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

Postcss error when building locally, but works with server mode #306

Closed
brunoamaral opened this issue Jul 10, 2020 · 2 comments
Closed

Postcss error when building locally, but works with server mode #306

brunoamaral opened this issue Jul 10, 2020 · 2 comments

Comments

@brunoamaral
Copy link

 ~/Labs/docsy >> hugo -c exampleSite --config themes/docsy/config.toml -d public
Total in 389 ms
Error: Error building site: POSTCSS: failed to transform "scss/main.css" (text/css): resource "scss/scss/main.scss_4853eb546e7a6c0898ed71feae7357c0" not found in file cache

However, if I run the same command as server, it works. hugo -c exampleSite --config themes/docsy/config.toml server

Any idea on what could be causing this ?

@brunoamaral
Copy link
Author

I was missing installing autoprefixer and postcss, but it still fails:

Building sites … Labs/node_modules/fs-extra/lib/mkdirs/make-dir.js:85
      } catch {
              ^

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:152:10)
    at Module._compile (module.js:624:28)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (Labs/node_modules/fs-extra/lib/mkdirs/index.js:3:44)
Total in 853 ms
Error: Error building site: POSTCSS: failed to transform "scss/main.css" (text/css): Labs/node_modules/fs-extra/lib/mkdirs/make-dir.js:85
      } catch {
              ^

SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:152:10)
    at Module._compile (module.js:624:28)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (Labs/node_modules/fs-extra/lib/mkdirs/index.js:3:44)

@brunoamaral
Copy link
Author

This was fixed by updating node to v12.18.2

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

1 participant