I am stoked about Hugo Pipes, as it’s a chance for me to create my own Modular CSS workflow. Using Pipes and the globbing functionality of PostCSS, I should be able to concatenate and process discrete CSS text files eg from /src/03-objects/**/**/*.css
I’ve managed to get Pipes working, which is brilliant. But as soon as I invoke PostCSS, it opens a can of npm worms, all due to my local setup (works fine when I deploy to Netlify).
I’m in the process of clearing out my Node/npm installation on my old Mac running 10.13, but before I reinstall everything, I was wondering if anyone had any advice on installing Node/npm on a Mac so that it works with Hugo and PostCSS? eg should I install from binaries, should I use brew etc?
FWIW, this is the local Node error I get:
Error: Error building site: POSTCSS: failed to transform "css/main.css" (text/css): /Users/fgw/.nvm/versions/node/v8.9.1/lib/node_modules/postcss-cli/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:139:10)
at Module._compile (module.js:599:28)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/fgw/.nvm/versions/node/v8.9.1/lib/node_modules/postcss-cli/node_modules/fs-extra/lib/mkdirs/index.js:3:44)
And this is the very barebones Hugo site, called Godular (that’s short for Hugo Modular CSS, not an indication of it’s importance in the universe)
thanks, Jake