intuit / postcss-themed

A PostCSS plugin for generating themes.
MIT License
62 stars 31 forks source link

chore: docs, added create react app template for post css to be added… #30

Open reubenae opened 4 years ago

reubenae commented 4 years ago

… to as an example

Making a start on https://github.com/intuit/postcss-themed/issues/22 - not ready for review yet

What Changed

Example project was added to a new folder examples/modern

Why

https://github.com/intuit/postcss-themed/issues/22

Todo:

reubenae commented 4 years ago

Getting this error:

TypeError: require(...) is not a function
    at Object.<anonymous> (/Users/revans8/dev/postcss-themed/examples/modern/postcss.config.js:14:34)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at module.exports.moduleId (/Users/revans8/dev/postcss-themed/examples/modern/node_modules/cosmiconfig/node_modules/import-fresh/index.js:28:9)
    at loadJs (/Users/revans8/dev/postcss-themed/examples/modern/node_modules/cosmiconfig/dist/loaders.js:9:18)

Bit stuck on how to get started with postcss. Which on one hand validates the value in this PR, but on the other hand is quite frustrating. Grateful for any hints @tylerkrupicka

tylerkrupicka commented 4 years ago

Thanks for taking a look at this!

Not 100% sure, would have to take a look later. Some ideas off the top of my head:

You're using a newer version of PostCSS that just came out, I haven't used it yet. I think plugins are a little different so maybe downgrading might help?

Maybe a different node version will help? I think I use 12.x.

I'd look at the PostCSS docs for using the config.js format vs config.json and see if something changed.

Thanks again!

tylerkrupicka commented 4 years ago

@hipstersmoothie have you ever seen this?