Skip to content

Emoji picker throwing type error in next.js #930

Closed

Description

@zaaakher

Describe the bug
I updated BlockNote the latest (0.15.0) and now I'm getting the following error form the useCreateBlockNote hook.

image

To Reproduce

  • Use PNPM
  • Start a next.js app (v14.2.5)
  • Use the useCreateBlockNote hook
  • You'll see the same error from the screenshot above

Misc

  • Node version: 18.20.3
  • Package manager: pnpm
  • Browser: Chrome
  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖

Activity

  1. zaaakher commented on Jul 15, 2024

    @zaaakher
    ContributorAuthor

    I can't pinpoint the exact cause of this issue but the mere mention of an emoji-related package makes me think it's caused after that latest emoji-picker feature from #854

  2. zaaakher commented on Jul 15, 2024

    @zaaakher
    ContributorAuthor

    I just want to point out I'm not really using the emoji-picker feature. My code is simply as follows:

    Initalizing blocknote:

      const noteEditor = useCreateBlockNote({
        dictionary: locales[lang as keyof typeof locales],
      });

    Rendering the ui

    <BlockNoteView
       dir={lang === "ar" ? "rtl" : "ltr"}
       editor={noteEditor}
       data-note-input
       theme={resolvedTheme as ThemeProps}
       onChange={async () => {
          const markdown = await noteEditor.blocksToMarkdownLossy(
             noteEditor.document,
          );
          field.onChange(markdown);
       }}
    />

    Commenting out the dictionary option doesn't remove the error. The error is removed only when I comment out the useCreateBlockNote (and the UI)

  3. added a commit that references this issue on Jul 15, 2024
    7b00f86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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