Skip to content

Compatibility with NextJS 15.x Pages Router / SSR #4664

@MauriceArikoglu

Description

@MauriceArikoglu

Description

Following the guide on https://platejs.org/docs/installation/manual or https://platejs.org/docs/installation/next yields successful development and production builds.

On development, plate displays fine - everything works as expected.

Running next start and opening a page errors:

Application error: a client-side exception has occurred while loading localhost (see the browser console for more information).

TypeError: can't access property "useRef", E.H is null
    NextJS 36
        useRef
        useSyncExternalStoreWithSelector
        n
        n
        j
        e_
        rS
        rw
        t$
        rU
        a$
        ob
        oB
        sc
        su
        su
        i7
        sB
        _
        45919
        r
        62786
        r
        24279
        r
        78944
        r
        51467
        r
        58340
        r
        <anonymous>
        O
        <anonymous>
        t
        <anonymous>

moduleResolution is bundler

Reproduction URL

No response

Reproduction steps

1. Next 15.x Pages Router
2. Follow the instruction to install platejs
3. next build
4. next start
5. See error upon loading page

Plate version

49

Slate React version

0.117.4

Screenshots

Logs

Browsers

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcore

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions