Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher') #153

Open
MeDeveloperWeb opened this issue Feb 16, 2025 · 3 comments

Comments

@MeDeveloperWeb
Copy link

Using the Reactjs Tiptap editor in next js app directory gives following error trace:

TypeError: Cannot read properties of undefined (reading 'ReactCurrentDispatcher')
at eval (webpack-internal:///(app-pages-browser)/./node_modules/reactjs-tiptap-editor/lib/vendor-CDx3V-R7.js:43732:16)
at ZG (webpack-internal:///(app-pages-browser)/./node_modules/reactjs-tiptap-editor/lib/vendor-CDx3V-R7.js:45190:4)
at eval (webpack-internal:///(app-pages-browser)/./node_modules/reactjs-tiptap-editor/lib/vendor-CDx3V-R7.js:48747:22)
at (app-pages-browser)/./node_modules/reactjs-tiptap-editor/lib/vendor-CDx3V-R7.js (http://localhost:3000/_next/static/chunks/_app-pages-browser_src_components_tiptap_editor_jsx.js:11678:1)
at options.factory (http://localhost:3000/_next/static/chunks/webpack.js?v=1739710737632:712:31)
at webpack_require (http://localhost:3000/_next/static/chunks/webpack.js?v=1739710737632:37:33)
at fn (http://localhost:3000/_next/static/chunks/webpack.js?v=1739710737632:369:21)
at eval (webpack-internal:///(app-pages-browser)/./node_modules/reactjs-tiptap-editor/lib/tiptap-CibBmg3k.js:64:77)
at (app-pages-browser)/./node_modules/reactjs-tiptap-editor/lib/tiptap-CibBmg3k.js (http://localhost:3000/_next/static/chunks/_app-pages-browser_src_components_tiptap_editor_jsx.js:11656:1)
at options.factory (http://localhost:3000/_next/static/chunks/webpack.js?v=1739710737632:712:31)
at webpack_require (http://localhost:3000/_next/static/chunks/webpack.js?v=1739710737632:37:33)
at fn (http://localhost:3000/_next/static/chunks/webpack.js?v=1739710737632:369:21)
at eval (webpack-internal:///(app-pages-browser)/./node_modules/reactjs-tiptap-editor/lib/utils-DvW-fR8u.js:55:78)
at (app-pages-browser)/./node_modules/reactjs-tiptap-editor/lib/utils-DvW-fR8u.js (http://localhost:3000/_next/static/chunks/_app-pages-browser_src_components_tiptap_editor_jsx.js:11667:1)
at options.factory (http://localhost:3000/_next/static/chunks/webpack.js?v=1739710737632:712:31)
at webpack_require (http://localhost:3000/_next/static/chunks/webpack.js?v=1739710737632:37:33)
at fn (http://localhost:3000/_next/static/chunks/webpack.js?v=1739710737632:369:21)
at eval (webpack-internal:///(app-pages-browser)/./src/components/tiptap/editor.jsx:6:79)
at (app-pages-browser)/./src/components/tiptap/editor.jsx (http://localhost:3000/_next/static/chunks/_app-pages-browser_src_components_tiptap_editor_jsx.js:2383:1)
at options.factory (http://localhost:3000/_next/static/chunks/webpack.js?v=1739710737632:712:31)
at webpack_require (http://localhost:3000/_next/static/chunks/webpack.js?v=1739710737632:37:33)
at fn (http://localhost:3000/_next/static/chunks/webpack.js?v=1739710737632:369:21)

How to reproduce:

Just create a new next app and use the Reactjs Tiptap editor

or

Clone this repo and run

@hunghg255
Copy link
Owner

can you try use import Editor ssr = false

import dynamic from "next/dynamic";
const Editor = dynamic(() => import("@/components/tiptap"), { ssr: false });

@MeDeveloperWeb
Copy link
Author

can you try use import Editor ssr = false

import dynamic from "next/dynamic";
const Editor = dynamic(() => import("@/components/tiptap"), { ssr: false });

It is already included. See

@hunghg255
Copy link
Owner

hunghg255 commented Feb 16, 2025

can you try use import Editor ssr = false
import dynamic from "next/dynamic";
const Editor = dynamic(() => import("@/components/tiptap"), { ssr: false });

It is already included. See

I think your problem is next 15, maybe, you can downgrade to version 14 and use react 18

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants