Internal server error: Cannot read property 'theme' of undefined
See original GitHub issueDescribe the bug
I am trying to use @tailwindcss/jit with Vite. I have followed the documentation and various articles online on how to configure it but it fails whenever I run yarn dev
. I get an error.
Reproduction
https://github.com/BreakInvent/breakinvent-website.git
System Info
System:
OS: macOS 11.2.1
CPU: (8) x64 Intel(R) Core(TM) i7-8557U CPU @ 1.70GHz
Memory: 1.38 GB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 12.19.0 - ~/.nvm/versions/node/v12.19.0/bin/node
Yarn: 1.22.10 - ~/.nvm/versions/node/v12.19.0/bin/yarn
npm: 6.14.8 - ~/.nvm/versions/node/v12.19.0/bin/npm
Browsers:
Chrome: 91.0.4472.114
Edge: 91.0.864.48
Firefox: 89.0
Safari: 14.0.3
npmPackages:
vite: ^2.3.8 => 2.3.8
Used Package Manager
yarn
Logs
07:01:33 [vite] Internal server error: Cannot read property 'theme' of undefined
Plugin: vite:css
File: /Users/xxxxxx/xxxxxx/assets/css/style.css
at _default (/Users/xxxxxx/xxxxxx/node_modules/tailwindcss/lib/lib/substituteScreenAtRules.js:16:5)
at /Users/xxxxxx/xxxxxx/node_modules/@tailwindcss/jit/src/index.js:50:11
at LazyResult.runOnRoot (/Users/xxxxxx/xxxxxx/node_modules/postcss/lib/lazy-result.js:339:16)
at LazyResult.runAsync (/Users/xxxxxx/xxxxxx/node_modules/postcss/lib/lazy-result.js:391:26)
at LazyResult.async (/Users/xxxxxx/xxxxxx/node_modules/postcss/lib/lazy-result.js:221:30)
at LazyResult.then (/Users/xxxxxx/xxxxxx/node_modules/postcss/lib/lazy-result.js:206:17)
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn’t already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a Vite issue and not a framework-specific issue. For example, if it’s a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/vue-next instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
TypeError: Cannot read property 'theme' of undefined #188
Module build failed (from ./node_modules/svelte-loader/index.js): TypeError: Cannot read property 'theme' of undefined.
Read more >Cannot read property 'theme' of undefined at runMicrotasks ...
JS, TailwinCSS, Npm and vercel to deploy. In fact, when i start the server, i'm having this issue (also when deploying on Vercel):...
Read more >Error "Cannot read property 'cycle' of undefined" in Essential ...
Good afternoon everyone, I am new to Moodle and am working with the theme "Essential", with the corresponding version of Moodle 2.7 and...
Read more >Error in running "npm run dev" - Laracasts
Running "npm run dev " gives the following error. Can someone help me solve this? ... TypeError: Cannot read property 'theme' of undefined...
Read more >Uncaught TypeError: Cannot read property '1' of undefined
This error occurs in Chrome Browser when you read a property or call a method on an undefined object . Uncaught TypeError: Cannot...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Try 2.4.0-beta.3, there was a fix related to this
I can confirm it works as well! 👍