Skip to content

TypeError: Cannot read property 'theme' of undefined #26337

@phoshenwen

Description

@phoshenwen

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, then npm 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    examplesIssue was opened via the examples template.good first issueEasy to fix issues, good for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions