Skip to content

Sample App Crashes with createContext is not a function due to @emotion/core #4002

@paespiza

Description

@paespiza

Hey Builder.io team! 👋

I’m working on the vcp-sample-app as part of the Sales Engineer tech challenge, and I ran into a hard crash on startup using the latest versions of React and Next.js.

Error: TypeError: (0 , react__WEBPACK_IMPORTED_MODULE_1__.createContext) is not a function

After some digging, I found the root cause: the app (or one of its dependencies) is still referencing @emotion/core, which is deprecated and incompatible with React 18+.

Fix:

  • Remove @emotion/core
  • Replace with @emotion/react and @emotion/styled
  • Ensure Builder.io SDK or any sample configs don’t rely on the deprecated package

Would love it if the sample repo could be updated so others don’t hit the same issue.

Thanks! Loving the platform so far

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions