question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Internal server error: Cannot read property 'theme' of undefined

See original GitHub issue

Describe 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

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
patak-devcommented, Jul 3, 2021

Try 2.4.0-beta.3, there was a fix related to this

1reaction
djokscommented, Jul 3, 2021

Try 2.4.0-beta.3, there was a fix related to this

@patak-js : Tried it and voila , its smooth now !! 💯 Thanks 👍

I can confirm it works as well! 👍

Read more comments on GitHub >

github_iconTop 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 >

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