Error while Migrate from TailwindCSS V3 to V4 using npx @tailwindcss/upgrade
#15809
-
i tried to upgrade from tailwindcss v3 to v4 using PS C:\Users\name\Projects\portfolio> npx @tailwindcss/upgrade --force
(node:50016) ExperimentalWarning: CommonJS module C:\Users\name\AppData\Roaming\npm\node_modules\npm\node_modules\debug\src\node.js is loading ES Module C:\Users\name\AppData\Roaming\npm\node_modules\npm\node_modules\supports-color\index.js using require().
Support for loading ES Module in require() is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
≈ tailwindcss v4.0.0
│ Searching for CSS files in the current directory and its subdirectories…
│ ↳ Linked `.\tailwind.config.ts` to `.\src\styles\globals.css`
│ Migrating JavaScript configuration files…
│ ↳ Could not load the configuration file: `addUtilities({ ':root' : … })` defines an invalid utility selector. Utilities must be a single class name and start with a lowercase letter, eg.
│ `.scrollbar-none`. I saw many were having the same issue, especially on Windows #15220 if any anyone know a solution pls tell me |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hello @codezeros I had this same problem and i tried removing plugins from |
Beta Was this translation helpful? Give feedback.
Hello @codezeros
I had this same problem and i tried removing plugins from
tailwindcss.config.ts
ortailwindcss.config.js
and it worked after removing them :) and you can add back based on the new tailwindcss v4 refer: https://tailwindcss.com/docs/functions-and-directives#plugin-directive and https://tailwindcss.com/docs/adding-custom-styles