-
Notifications
You must be signed in to change notification settings - Fork 27k
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
TypeError: Cannot read property 'theme' of undefined #26337
Comments
I disabled |
As I can see the example doesn't work even in my PR. Tried to make a fast fix but had no luck. You can try to use an example that uses emotion and tailwindcss with twin macro. Hope it'll be merged. |
I use It seems that the error occurs from tailwind 2.2.0. |
I have same error. |
This solved the problem for me.
|
@ru88s just to confirm, you're using tailwindcss 2.1.4 in your example and are proposing a fix for 2.1.4 only. This is NOT a fix for tailwind 2.2.x, and 2.2.x continues to NOT work. Other than version bumping in the here referenced posts, no code base has changed and using tailwindcss 2.2.4 still won't run. |
@phoshenwen This may be an issue with xwind, since @akellbl4 has an example working with twin.macro → #26060 |
@samsisle I can see this being an issue with Tailwindcss more so than Nextjs, only opened it here because the Nextjs example is not working out of the box. Once @akellbl4's pull request is merged this post can go away. |
this was our fix! thanks a lot |
Closes [#26337](#26337). This PR fixes #26337. The issue is just the version of xwind basically. Not compatible with newer versions and jit mode. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. - [ ] Errors have helpful link attached, see `contributing.md` ## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint`
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What example does this report relate to?
with-tailwindcss-emotion
What version of Next.js are you using?
11 | 10.2.3
What version of Node.js are you using?
14.17.1
What browser are you using?
Chrome & Firefox
What operating system are you using?
Win 10
How are you deploying your application?
n/a
Describe the Bug
Running "npm run dev" results in
TypeError: Cannot read property 'theme' of undefined
Expected Behavior
Running "npm run dev" starts up the application without errors
To Reproduce
Following the instructions, I ran
npx create-next-app --example with-tailwindcss-emotion with-tailwindcss-emotion-app
, thennpm run dev
, then see error.EDIT: Might relate to #25854 and #26012. The only tailwindcss version that works while disabling
mode: "jit"
is tailwindcss 2.1.4 (thanks for the pull request, @akellbl4 )If this is considered a duplicate, please close/delete
The text was updated successfully, but these errors were encountered: