tui.editor icon indicating copy to clipboard operation
tui.editor copied to clipboard

When I run it after build, I get an error when I press enter key

Open kwunjaehyun opened this issue 1 year ago • 7 comments

Describe the bug

When I run it after build, I get an error when I press enter key

build tool : vite react 18 with ts package manager: pnpm

error message : Uncaught RangeError: Can not convert <> to a Fragment (looks like multiple versions of prosemirror-model were loaded)

To Reproduce

Steps to reproduce the behavior:

  1. open editor
  2. push enter key
  3. error

Expected behavior

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem. image

Desktop (please complete the following information):

  • OS: ubuntu
  • Browser chrome
  • Version [e.g. 22]

Additional context

Add any other context about the problem here.

kwunjaehyun avatar Jun 01 '23 12:06 kwunjaehyun

hah, I have same problem. And I couldn't resolve it.

ki7ick avatar Aug 16 '23 06:08 ki7ick

same problem

Cat1007 avatar Aug 29 '23 11:08 Cat1007

same problem

wu985215993 avatar Oct 15 '23 05:10 wu985215993

yup, same problem here as well

martinpokorny avatar Oct 20 '23 06:10 martinpokorny

same problem

hahagarden avatar Nov 13 '23 09:11 hahagarden

Take a look at https://github.com/ueberdosis/tiptap/issues/577 and try workarounds

  1. add resolutions in package.json. use version 1.16.1
// package.json
"resolutions": {
  "prosemirror-model": "1.16.1"
},
  1. use "type": "commonjs" instead of "type": "module" in package.json (but it makes no difference for me)
  2. remove node_modules and lock files (not sure if it is needed)
  3. install packages again

It works for me.

dolsup avatar Dec 11 '23 08:12 dolsup

Take a look at ueberdosis/tiptap#577 and try workarounds

  1. add resolutions in package.json. use version 1.16.1
// package.json
"resolutions": {
  "prosemirror-model": "1.16.1"
},
  1. use "type": "commonjs" instead of "type": "module" in package.json (but it makes no difference for me)
  2. remove node_modules and lock files (not sure if it is needed)
  3. install packages again

It works for me.

also works for me, just add "resolutions" to the package.json and execute pnpm install.

ZhouYC404 avatar Jul 09 '24 02:07 ZhouYC404