Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

whole project crashing and getting duplicate use of selection JSON ID cell error #625

Open
romaad opened this issue Jan 16, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@romaad
Copy link

romaad commented Jan 16, 2022

A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. added the library to my react project
  2. render a component with
import Editor from "rich-markdown-editor";

export function AddPost() {
    return (
        <Editor
        defaultValue="Hello world!"
        />
    )
}
  1. the whole project doesn't render, following errors appear in build console:
WARNING in ./node_modules/rich-markdown-editor/dist/types/index.js
Module Warning (from ./node_modules/source-map-loader/dist/cjs.js):
Failed to parse source map from '/home/ramadan/code/romad-front/node_modules/rich-markdown-editor/src/types/index.ts' file: Error: ENOENT: no such file or directory, open '/home/ramadan/code/romad-front/node_modules/rich-markdown-editor/src/types/index.ts'
 @ ./node_modules/rich-markdown-editor/dist/nodes/CodeFence.js 99:16-35
 @ ./node_modules/rich-markdown-editor/dist/index.js 104:36-64
 @ ./src/detailed-post/AddPost.tsx 4:0-42 7:30-36
 @ ./src/router/RoutingContainer.tsx 5:0-51 48:36-43
 @ ./src/App.tsx 5:0-61 21:39-55
 @ ./src/index.tsx 7:0-24 11:33-36

and following in chrome console:

selection.js:181 Uncaught RangeError: Duplicate use of selection JSON ID cell
    at Function.jsonID (selection.js:181)
    at Module../node_modules/rich-markdown-editor/node_modules/prosemirror-tables/dist/index.es.js (cellselection.js:210)
    at Module.options.factory (react refresh:6)
    at __webpack_require__ (bootstrap:24)
    at fn (hot module replacement:61)
    at Object../node_modules/rich-markdown-editor/dist/menus/formatting.js (formatting.ts:15)
    at Object.options.factory (react refresh:6)
    at __webpack_require__ (bootstrap:24)
    at fn (hot module replacement:61)
    at Object../node_modules/rich-markdown-editor/dist/components/SelectionToolbar.js (SelectionToolbar.tsx:9)

Expected behavior
Project should render, component should have the editor
Version
"react": "^17.0.2",
"react-bootstrap": "^2.1.1",
"react-dom": "^17.0.2",
"react-icons": "^4.3.1",
"react-router": "^6.2.1",
"react-router-dom": "^6.2.1",
"react-scripts": "5.0.0",
"rich-markdown-editor": "^11.21.3",

Desktop (please complete the following information):

  • OS: ubuntu
  • Browser: chrome
@romaad romaad added the bug Something isn't working label Jan 16, 2022
@galexandrade
Copy link

Yeah. I'm also getting this error.

@aspsnd
Copy link

aspsnd commented Jan 19, 2022

Yeah. I'm also getting this error, too.

@robothot
Copy link

robothot commented Jan 19, 2022

@galexandrade @aspsnd

if use npm

change packages.json

{
 ....
 "overrides": {
        "prosemirror-tables": "^1.1.1"
    }
}

Important

  1. rm -rf node_modules
  2. rm -rf package-lock.json
  3. npm install

npm 8.3.1 +

or use yarn resolutions, I'm so sorry, it's not my native language

Link

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants