Skip to content
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

Tailwind CSS + Emotion production Cannot read property 'theme' of undefined #27781

Closed
ghost opened this issue Aug 5, 2021 · 3 comments
Closed
Labels
bug Issue was opened via the bug report template. examples Issue/PR related to examples

Comments

@ghost
Copy link

ghost commented Aug 5, 2021

What example does this report relate to?

with-tailwindcss-emotion

What version of Next.js are you using?

latest (11.0.1)

What version of Node.js are you using?

14.17.3

What browser are you using?

Chrome

What operating system are you using?

Windows

How are you deploying your application?

npm run dev

Describe the Bug

npx create-next-app --ts -e with-tailwindcss-emotion twopointoh
cd twopointoh
npm run dev

produces this error

error - ./pages/_app.js
TypeError: Cannot read property 'theme' of undefined

Expected Behavior

It should compile and run in the browser

To Reproduce

See description

@ghost ghost added bug Issue was opened via the bug report template. examples Issue/PR related to examples labels Aug 5, 2021
@ch4nd4n
Copy link

ch4nd4n commented Nov 24, 2021

Duplicate of - #26337
to solve it

  1. Downgrade tailwindcss to 2.1.4 in package.json
  2. comment out mode jit in tailwinds.config.js

delete .next folder and reinstall dependencies. I wrote about it at https://www.chandankumar.com/tutorial/nextjs-tailwind-emotion-setup

@balazsorban44
Copy link
Member

Duplicate of #26337

@balazsorban44 balazsorban44 marked this as a duplicate of #26337 Dec 7, 2021
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. examples Issue/PR related to examples
Projects
None yet
Development

No branches or pull requests

2 participants