Skip to content

Missing source context exception with newest sanity package on nextjs #187

@sepal

Description

@sepal

Describe the bug

I've been trying to update sanity in my nextjs app, but unfortunatelly that breaks the sanity editor with the exception:

Could not find `source` context

Thrown through the DocumentInternationalizationProvider component that tries to call the useClient hook.

I don't have any issues though, if I ran the sanity editor as a standalone app (e.g. with vite). So I'm not sure what's causing the issue here.

To Reproduce

I created a small example repo here: https://github.com/sepal/next-sanity-update-example

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