"Cannot apply unknown utility class" #18936
-
I've been trying to upgrade this Astro template to Tailwind v4 for the last two hours. I'm following all the steps listed in Astro's docs:
Here's the full terminal history for reference~/Desktop/marmo main 06:22:43 PM ❯ npm install npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful. npm warn deprecated @humanwhocodes/config-array@0.13.0: Use @eslint/config-array instead npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported npm warn deprecated @humanwhocodes/object-schema@2.0.3: Use @eslint/object-schema instead npm warn deprecated eslint@8.57.1: This version is no longer supported. Please see https://eslint.org/version-support for other options.
action required You must import your Tailwind stylesheet, e.g. in a shared layout: ╭ src/layouts/Layout.astro ──────╮ ························································································································································· removed 13 packages, and audited 786 packages in 879ms 358 packages are looking for funding found 0 vulnerabilities │ Git directory is not clean. Please stash or commit your changes before migrating. │ You may use the ························································································································································· │ Searching for CSS files in the current directory and its subdirectories… │ Migrating stylesheets… │ ↳ Cannot apply unknown utility class │ ↳ Migrated stylesheet: │ Updating dependencies… │ ↳ Updated package: │ ↳ Updated package: │ Migrating templates… Error: Cannot apply unknown utility class The error is
I'm not using modules, though, as you can see. It's just one |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
The You could consider:
|
Beta Was this translation helpful? Give feedback.
I mean installing/combining into.
Ah, I see, thank you. It seems you may have missed out the second step:
The
@import
would replace the@tailwind
directives.