TypeError: Cannot read properties of undefined (reading '700')
Problem
What version of Tailwind CSS are you using? "tailwindcss": "^3.0.1", What build tool (or framework if it abstracts the build tool) are you using? "postcss": "^8.3.11", Angular 13 , What version of Node.js are you using? node : v16.13.0 What browser are you using? Chrome, What operating system are you using? Ubuntu 20.04 Describe your issue after I update Tailwindcss on my angular 13 project I get the below error when I try to run the project I try to look into these files I found that the gray color has problems or is even not found also I have a custom tailwind.config `TypeError: Cannot read properties of undefined (reading '700') at module.exports ( node_modules/@tailwindcss/typography/src/styles.js:16:65) at value ( node_modules/tailwindcss/lib/util/resolveConfig.js:68:41) at node_modules/tailwindcss/lib/util/resolveConfig.js:132:24 at Array.map (<anonymous>) at Object.typography ( node_modules/tailwindcss/lib/util/resolveConfig.js:132:15) at node_modules/tailwindcss/lib/util/resolveConfig.js:155:57 at Array.reduce (<anonymous>) at resolveFunctionKeys (node_modules/tailwindcss/lib/util/resolveConfig.js:152:32) at Object.resolveConfig [as default] (node_modules/tailwindcss/lib/util/resolveConfig.js:224:16) at Object.resolveConfig [as default] (node_modules/tailwindcss/lib/public/resolve-config.js:15:39) ` here is the code where styles.js throw error: `module.exports = (theme) => ({ DEFAULT: { css: [
Error Output
error when I try to run the project I try to look into these files I found that the gray color has problems or is even not found also I have a custom tailwind.config
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: TypeError: Cannot read properties of undefined (reading '700')
I specifically had the problem using nuxt/tailwindcss-module with `"@tailwindcss/typography": "^0.5.0",` , which seems to not be compatible anymore with tailwindcss < 3.0.0. The Nuxt TailwindCSS module uses tailwind:"^2.0.4" and is not upgraded yet to Tailwind 3, see https://github.com/nuxt-community/tailwindcss-module/pull/407 Downgrading to `"@tailwindcss/typography": "^0.4.1",` works for me!
Trust Score
6 verifications
- 1
I specifically had the problem using nuxt/tailwindcss-module with `"@tailwindcss
I specifically had the problem using nuxt/tailwindcss-module with `"@tailwindcss/typography": "^0.5.0",` , which seems to not be compatible anymore with tailwindcss < 3.0.0.
- 2
The Nuxt TailwindCSS module uses tailwind:"^2.0.4" and is not upgraded yet to Ta
The Nuxt TailwindCSS module uses tailwind:"^2.0.4" and is not upgraded yet to Tailwind 3, see https://github.com/nuxt-community/tailwindcss-module/pull/407
- 3
Downgrading to `"@tailwindcss/typography": "^0.4.1",` works for me!
Downgrading to `"@tailwindcss/typography": "^0.4.1",` works for me!
Validation
Resolved in tailwindlabs/tailwindcss GitHub issue #6398. Community reactions: 26 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep