'Tailwind V3 causing TypeError: Cannot read property '500' of undefined
I recently tried to upgrade my project to tailwind css and I'm getting this error
this is my tailwind config
module.exports = {
mode: "jit",
purge: ["./pages/**/*.{js,ts,jsx,tsx}", "./components/**/*.{js,ts,jsx,tsx}"],
darkMode: "class", // or 'media' or 'class'
theme: {
extend: {
colors: {
secondaryDark: "#171A1A",
primaryDark: "#090A0A",
neonOrange: "#FF9933",
redditRed: "#FF5700",
cardGradientPrimary: "#ff930f",
cardGradientSecondary: "#fff95b",
},
},
},
variants: {
extend: {},
},
plugins: [require("@tailwindcss/forms")],
};
Solution 1:[1]
I have the same issue after upgrade to tailwind v3 and fixed it by update @tailwindcss/forms to 0.4.0
Solution 2:[2]
try this :
npm install -D @tailwindcss/forms@next
to update the plugins @tailwindcss/forms
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | cheng |
Solution 2 | ANDRIANIAINA |