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

Markdown editor not working - possible package version mismatches #133

Open
BartlomiejLewandowski opened this issue Jan 14, 2023 · 0 comments

Comments

@BartlomiejLewandowski
Copy link

Hi,

I've been trying to integrate and extend starboard notebook to have a side panel, and a few other improvements.
It's was going along nicely, until I noticed that the markdown editor has an issue - typing anything resets the cursor and an error message is shown - that "prosemirror-model" has been loaded twice.

I've been scratching my head for a few days now, trying to get to the bottom and slowly loosing my sanity ;)
These are the things that I've tried / found out in the debugging sessions:

  • tried building a fresh repository from scratch, which shows the same error
  • tried a version with a lower tag - v0.15.6, same story

I'm using yarn, and just building the packages/starboard-notebook part.
I've read a bit about prosemirror-model errors, and it would seem like something that should be resolved by resolutions field in yarn.
I've pinned the following versions

 "resolutions": {
    "prosemirror-commands": "1.5.0",
    "prosemirror-dropcursor": "1.6.1",
    "prosemirror-gapcursor": "1.3.1",
    "prosemirror-history":"1.3.0",
    "prosemirror-inputrules":"1.2.0",
    "prosemirror-keymap": "1.2.0",
    "prosemirror-markdown":"1.10.1",
    "prosemirror-model": "1.13.3",
    "prosemirror-schema-list":"1.2.2",
    "prosemirror-state": "1.4.2",
    "prosemirror-tables": "1.3.2",
    "prosemirror-utils":"0.9.6"
  },```

The error still persists.

So I went to check if starboard-rich-editor and it's dependency is to blame.
Interestingly markdown-editor has a similar issue - prosemirror-model also logs the same error when trying to import and use Editor from that package.
It was resolved by specifying  "prosemirror-model": "1.13.3".

I'm really curious how the dist package was built that is being hosted on unkpg, since that script doesn't suffer from this error.
I'm sure it boils down to yarn package resolution + webpack somehow including an odd version of a package?

Would appreciate any guidance here, I think this repo is a gem with the pyodide integration

@BartlomiejLewandowski BartlomiejLewandowski changed the title Markdown editor not working - possible Markdown editor not working - possible package version mismatches Jan 14, 2023
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

1 participant