Latest Tailwind and @tailwindcss/jit compilation - TypeError: Cannot read property 'theme' of undefined #5110
Answered
by
ConnorJamesLow
ConnorJamesLow
asked this question in
Help
-
When updating to the latest version of tailwindcss, @tailwindcss/jit stopped working. Here's the full output (as noted, using postcss-cli):
|
Beta Was this translation helpful? Give feedback.
Answered by
ConnorJamesLow
Jul 29, 2021
Replies: 1 comment 1 reply
-
Nevermind. I was using the old If anyone needs to use // around line 45
return postcss([
removeLayerAtRules(context),
expandTailwindAtRules(context, registerDependency),
expandApplyAtRules(context),
// begin changes
evaluateTailwindFunctions(context), // instead of evaluateTailwindFunctions(context.tailwindConfig),
substituteScreenAtRules(context), // instead of substituteScreenAtRules(context.tailwindConfig),
// end changes.
collapseAdjacentRules(context),
]).process(root, { from: undefined }) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
simonswiss
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nevermind. I was using the old
@tailwindcss/jit
instead of just settingmode: 'jit'
in tailwind.config.js. This seems to fix it.If anyone needs to use
@tailwindcss/jit
for any reason, you can also fix it by updating this bit of @tailwindcss\jit\src\index.js: