react-codemirror icon indicating copy to clipboard operation
react-codemirror copied to clipboard

Basic install doesn't work

Open thebpmgroup opened this issue 3 years ago • 5 comments

Follow the instructions here to the letter.

Run the example

Module not found: Error: Package path ./keymap/sublime is not exported from package Module not found: Error: Package path ./theme/monokai.css is not exported from package

Are there any up to date instructions?

thebpmgroup avatar Jul 14 '22 09:07 thebpmgroup

@thebpmgroup https://codesandbox.io/embed/react-codemirror-example-vgr4n?fontsize=14&hidenavigation=1&theme=dark

jaywcjlove avatar Jul 14 '22 09:07 jaywcjlove

That looks like the same code as in the walkthrough, which doesn't work.

It is referencing paths that do not exist.

import "codemirror/keymap/sublime";
import "codemirror/theme/monokai.css";

Neither of these folders exist. I have deleted my node_modules folder and reinstalled and it is still not there.

It looks like the npm package is stuffed.

thebpmgroup avatar Jul 14 '22 13:07 thebpmgroup

It looks like it is codemirror itself that is broken. There was a version 6.0.1 published 14 days ago that has really screwed the pooch. Downgrading to 5.65.6 gets things "working" but although the theme css file is not giving an error the editor is still showing a light (default?) theme.

This seems like quite a serious problem for your tool at present.

thebpmgroup avatar Jul 14 '22 13:07 thebpmgroup

https://github.com/uiwjs/react-codemirror/releases/tag/v4.0.0

@thebpmgroup Yes, v3 and v4 are not simple upgrades if used in depth.

jaywcjlove avatar Jul 14 '22 16:07 jaywcjlove

codemirror made big changes.

jaywcjlove avatar Jul 14 '22 16:07 jaywcjlove