Skip to content

TypeError: Cannot read properties of undefined #166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
smith558 opened this issue Sep 5, 2024 · 1 comment
Closed

TypeError: Cannot read properties of undefined #166

smith558 opened this issue Sep 5, 2024 · 1 comment

Comments

@smith558
Copy link

smith558 commented Sep 5, 2024

What version of @tailwindcss/forms are you using?

v0.3.4

What version of Node.js are you using?

v20.17.0

What browser are you using?

Chrome

What operating system are you using?

Ubuntu

Reproduction repository

N/A (can provide upon request)

Describe your issue

Getting:

TypeError: Cannot read properties of undefined (reading '500')
Occurred while linting /home/stanley/repos/VBD Hub/hub-frontend/tailwind.config.ts:1
Rule: "prettier/prettier"

TypeError: Cannot read properties of undefined (reading '500')
    at /home/stanley/repos/VBD Hub/hub-frontend/node_modules/@tailwindcss/forms/src/index.js:34:63
    at registerPlugins (/home/stanley/repos/VBD Hub/hub-frontend/node_modules/tailwindcss/lib/lib/setupContextUtils.js:815:61)
    at createContext (/home/stanley/repos/VBD Hub/hub-frontend/node_modules/tailwindcss/lib/lib/setupContextUtils.js:1221:5)
    at eY (file:///home/stanley/repos/VBD%20Hub/hub-frontend/node_modules/prettier-plugin-tailwindcss/dist/index.mjs:2353:41224)
    at async b2 (file:///home/stanley/repos/VBD%20Hub/hub-frontend/node_modules/prettier-plugin-tailwindcss/dist/index.mjs:2353:40349)
    at async Object.parse (file:///home/stanley/repos/VBD%20Hub/hub-frontend/node_modules/prettier-plugin-tailwindcss/dist/index.mjs:2353:48339)
    at async parse4 (file:///home/stanley/repos/VBD%20Hub/hub-frontend/node_modules/prettier/index.mjs:20685:11)
    at async coreFormat (file:///home/stanley/repos/VBD%20Hub/hub-frontend/node_modules/prettier/index.mjs:21146:7)
    at async formatWithCursor (file:///home/stanley/repos/VBD%20Hub/hub-frontend/node_modules/prettier/index.mjs:21348:14)
    at async Module.format2 (file:///home/stanley/repos/VBD%20Hub/hub-frontend/node_modules/prettier/index.mjs:22733:25)
Process finished with exit code -1

Originating from:

'border-color': resolveColor(
theme('colors.gray.500', colors.gray[500]),
'--tw-border-opacity'

Which results in:

/home/stanley/.nvm/versions/node/v20.17.0/bin/npm run dev

> hub-frontend@0.1.0 dev
> next dev

  ▲ Next.js 14.2.4
  - Local:        http://localhost:3000
  - Environments: .env.local, .env

 ✓ Starting...
 ✓ Ready in 1577ms
 ○ Compiling /conference-liverpool-24 ...
 ⨯ ./app/globals.css.webpack[javascript/auto]!=!./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./app/globals.css
TypeError: Cannot read properties of undefined (reading '500')
Import trace for requested module:
./app/globals.css.webpack[javascript/auto]!=!./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./app/globals.css
./app/globals.css
 GET /conference-liverpool-24 200 in 2087ms
 ⨯ ./app/globals.css.webpack[javascript/auto]!=!./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./app/globals.css
TypeError: Cannot read properties of undefined (reading '500')
Import trace for requested module:
./app/globals.css.webpack[javascript/auto]!=!./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[13].oneOf[12].use[3]!./app/globals.css
./app/globals.css
 GET /conference-liverpool-24 500 in 1377ms
@smith558
Copy link
Author

smith558 commented Sep 5, 2024

Resolved by upgrading @tailwindcss/forms

@smith558 smith558 closed this as completed Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant