Same npm package working nicely on CodeSandbox but showing error on my local machine

Viewed 34

Trying to integrate a rich text editor package on one of my reactjs projects named Dante3 which is nicely working on CodeSandbox but on my local machine showing error : "Uncaught TypeError prosemirrorState.PluginKey is not a constructor". Error image : enter image description here

Note:The package Dante3 used ProseMirror(a rich text editor) on their building block.

I've maintained the same versions for all dependencies both on my machine and on CodeSandbox

Even I arise an issue on Dante3 GitHub repository and the owner himself also get confused about the issue and finally get back without any solution .

CodeSandbox link : https://codesandbox.io/s/dante3-react18-wejnp9

code on my machine :enter image description here

and the dependencies : enter image description here

1 Answers

I've just run into this issue as well. You may find this thread useful. Followed this advice specifically which was to remove node modules and install everything again as there seemed to be some dependency overlap. In my case the error arose because I was creating a custom extension with Plugin from prosemirror-state and was giving me a similar error to you but my stack trace included the prosemirror-table issue linked above.

Related