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

Installing tailwind causes app to throw #1111

Closed
iwatakeshi opened this issue Sep 9, 2020 · 7 comments · Fixed by #1121
Closed

Installing tailwind causes app to throw #1111

iwatakeshi opened this issue Sep 9, 2020 · 7 comments · Fixed by #1121
Labels
bug/confirmed We have confirmed this is a bug bug/repro-available A reproduction exists and needs to be confirmed

Comments

@iwatakeshi
Copy link

Hi, I'm trying to install Tailwind via yarn rw g util tailwind. However, when I run the dev server using yarn rw dev, I immediately see an error message saying:

ValidationError: Invalid options object. PostCSS Loader has been initialized using an options object that does not match the API schema.
 - options has an unknown property 'config'. These properties are valid:
   object { postcssOptions?, execute?, sourceMap? }

This error even occurs in a new project. It could be just me, but here are the steps that I took:

  1. yarn create redwood-app app
  2. cd app
  3. yarn rw g util tailwind
  4. yarn rw dev

Doing a little search shows that it could be webpack but I'm not sure.

@peterp peterp added bug/repro-available A reproduction exists and needs to be confirmed bug/confirmed We have confirmed this is a bug labels Sep 9, 2020
@peterp
Copy link
Contributor

peterp commented Sep 9, 2020

@iwatakeshi Thanks for reporting this - I'm fixing this now.

@thedavidprice This should go in v0.18.0

@peterp
Copy link
Contributor

peterp commented Sep 9, 2020

Hey @iwatakeshi This fix will be in the next release which will be out shortly.

@iwatakeshi
Copy link
Author

@peterp Awesome thanks!

I saw the changes in

options: {
options: {
postcssOptions: {
config: redwoodPaths.web.postcss,
},
},
},
}
but noticed that there are two options. I could be wrong but I think there should only be one since I just tried it locally by changing the config file manually and it worked.

@peterp
Copy link
Contributor

peterp commented Sep 9, 2020

@iwatakeshi Whoops, fixed now!

@rodocite
Copy link

rodocite commented Sep 18, 2020

@peterp Can you please take a second look on the fixes here? The tailwind generator (or tailwind for that matter) doesn't seem to work in development.

web | You did not set any plugins, parser, or stringifier. Right now, PostCSS does nothing. Pick plugins for your case on https://www.postcss.parts/ and use them in postcss.config.js.

Tailwind seems completely broken now starting from v0.18. Even a manual install does not work. The generator also generates:

@import "tailwindcss/base";
@import "tailwindcss/components";
@import "tailwindcss/utilities";

When it should be:

@tailwind "tailwindcss/base";
@tailwind "tailwindcss/components";
@tailwind "tailwindcss/utilities";

I provided some info which might help w/ tracing this:
https://github.com/redwoodjs/redwoodjs.com/pull/330#issuecomment-689153466

Willing to help w/ this but wanted to confirm that new projects using tailwind is indeed not working right now. I've tried generating 3 new projects on v0.19 and they're all broken as well. The app may startup, but tailwind styles are not being applied.

@noire-munich
Copy link
Collaborator

I unfortunately confirm: it broke my styling on latest version bump.

@noire-munich
Copy link
Collaborator

Issue might be related to #1170

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/confirmed We have confirmed this is a bug bug/repro-available A reproduction exists and needs to be confirmed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants