vadimdemedes / tailwind-rn

🦎 Use Tailwind CSS in React Native projects
MIT License
4.24k stars 170 forks source link

No utility classes were detected in your source files. If this is unexpected, double-check the `content` option in your Tailwind CSS configuration. #150

Closed spantheslayer closed 1 year ago

spantheslayer commented 2 years ago

Getting the below issue when running tailwind-rn. Please help!!

$ yarn dev:tailwind

warn - No utility classes were detected in your source files. If this is unexpected, double-check the `content` option in your Tailwind CSS configuration.
warn - https://tailwindcss.com/docs/content-configuration
Done in 61ms.

tailwindcss --input input.css --output tailwind.css --no-autoprefixer --watch exited with code SIGINT

tailwind.config.js file below

module.exports = {
  content: ["./src/**/*.{html,js}"],
  theme: {
    extend: {},
  },
  plugins: [],
  corePlugins: require("tailwind-rn/unsupported-core-plugins"),
};
djkloop commented 2 years ago
module.exports = {
  content: ["./src/**/*.{html,js}"], /// {html,js,jsx,ts,tsx} <- I have the same error as yours, you can try to change this to this, and change to this and my error will disappear
  theme: {
    extend: {},
  },
  plugins: [],
  corePlugins: require("tailwind-rn/unsupported-core-plugins"),
};

@spantheslayer

flcortesT commented 1 year ago

I found a way to fix this error using the content command: ['**'], after 8 hours of research, try it this way, the warning appeared at angular 16. node.js 18.8.8. Good luck