question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When I required theme.config.js IN tailwind.config.js, then failed to compile.

See original GitHub issue
Failed to compile.

./app/javascript/stylesheets/application.scss (./node_modules/css-loader/dist/cjs.js??ref--7-1!./node_modules/postcss-loader/src??ref--7-2!./node_modules/sass-loader/dist/cjs.js??ref--7-3!./app/javascript/stylesheets/application.scss)
Module build failed (from ./node_modules/postcss-loader/src/index.js):
SyntaxError

(2:2) `@apply` cannot be used with `.text-gray-600` because `.text-gray-600` either cannot be found, or its actual definition includes a pseudo-selector like :hover, :active, etc. If you're sure that `.text-gray-600` exists, make sure that any `@import` statements are being properly processed *before* Tailwind CSS sees your CSS, as `@apply` can only be used for classes in the same CSS tree.

  1 | body {
> 2 |   @apply font-sans text-sm leading-normal text-gray-600;
    |  ^
  3 | }
  4 | 

Everything is JUST the same as “https://github.com/hawezo/tailwindcss-theming/blob/master/docs/setup.md”, But it just failed.

So how can I get it work.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
szluyufengcommented, Feb 16, 2020

@hawezo Looking forward for that. Thanks for your work!

0reactions
innocenzicommented, Feb 16, 2020

Unfortunately not yet but this is something that I plan to do! See the other opened issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Compile Error When Adding @tailwindcss/ui Plugin to ...
Then moved on to adding the @tailwindcss/ui plugin to my tailwind.config.js file, instead of the CDN. Now I'm getting a compile error: ERROR...
Read more >
Configuration - Tailwind CSS
The theme section is where you define your color palette, fonts, type scale, border sizes, breakpoints — anything related to the visual design...
Read more >
Why am I getting this error (Tailwind + Next.js ... - Stack Overflow
It looks like that there is a particular class in one of your components that is breaking the css. The error is occurring...
Read more >
How to use Tailwind CSS in React to configure Create React ...
We demonstrate how to get Tailwind CSS working inside a CRA-based React project without having to eject Create React App.
Read more >
The complete guide to customizing a Tailwind CSS theme
config.js is used for Tailwind CSS theme customization. We will add our colors, fonts and other settings there. But first we need to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found