[plugin:vite:css] [postcss] Cannot read properties of undefined (reading 'config')

See original GitHub issue

Trying to migrate an existing studio from V2 to V3

[plugin:vite:css] [postcss] Cannot read properties of undefined (reading 'config')
    at getTailwindConfig (/Users/briannelson/Documents/GitHub/ross-rings-app/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:84:63)
    at /Users/briannelson/Documents/GitHub/ross-rings-app/node_modules/tailwindcss/lib/lib/setupTrackingContext.js:96:92
    at /Users/briannelson/Documents/GitHub/ross-rings-app/node_modules/tailwindcss/lib/processTailwindFeatures.js:46:11
    at plugins (/Users/briannelson/Documents/GitHub/ross-rings-app/node_modules/tailwindcss/lib/index.js:38:63)
    at LazyResult.runOnRoot (/Users/briannelson/Documents/GitHub/ross-rings-app/admin/node_modules/postcss/lib/lazy-result.js:339:16)
    at LazyResult.runAsync (/Users/briannelson/Documents/GitHub/ross-rings-app/admin/node_modules/postcss/lib/lazy-result.js:393:26)
    at LazyResult.async (/Users/briannelson/Documents/GitHub/ross-rings-app/admin/node_modules/postcss/lib/lazy-result.js:221:30)
    at LazyResult.then (/Users/briannelson/Documents/GitHub/ross-rings-app/admin/node_modules/postcss/lib/
Screen Shot 2022-11-18 at 1 36 27 PM

Issue Analytics

  • State:open
  • Created 10 months ago
  • Reactions:4
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
ntanwir10commented, Dec 13, 2022

I was also getting the same error. I got it working by deleting the tailwindcss:{} line in the postcss.config.js file.

1reaction
Ebalin1411commented, Dec 11, 2022

Getting a similar error 18:30:34 ~/Projects/Blog/sanity main $ sanity dev ✔ Checking configuration files... Sanity Studio using vite@3.2.5 ready in 1166ms and running at http://localhost:3333 18:31:11 [vite] Internal server error: [postcss] Cannot read properties of undefined (reading 'config')

Looks like it could be something todo with me having the sanity project nested within a project that is using tailwind.

Edit: Can confirm that sanity works fine outside of the project that contains the tailwind / next config.

yes. its working outside tailwind/next…

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: Cannot read properties of undefined (reading '700 ...
TypeError : Cannot read properties of undefined (reading '700') at module.exports ( node_modules/@tailwindcss/typography/src/styles.js:16:65) ...
Read more >
Sanity.io [vite] Internal server error: [postcss] Cannot read ...
I ended up creating a tailwind.config.js file in the sanity folder with the following information. It fixed it.
Read more >
[vite] Internal server error: Cannot read properties of undefined ...
Problem: You've just installed TailwindCSS but you get the error below as well as some indication that it might related to the PostCSS...
Read more >
vite internal server error | The AI Search Engine You Control
I am using vite's proxy server option in my vite.config.js so all requests ... error: [postcss] Cannot read properties of undefined (reading 'config')...
Read more >
How to solve my problem? (npm run build) - Laracasts
[vite:css] [postcss] Cannot read properties of undefined (reading 'config') file: /var/www/my_user/data/www/my_site/resources/sass/app.scss.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found