build failure due to upstream change in prosemirror-state on class Plugin
See original GitHub issueDescribe the bug
With prosemirror-state moving from javascript to typescript in version 1.4.0 the number of generic arguments for the class Plugin changed to one (optional). After running npm update (which updates prosemirror-state to 1.4.0) this results in the following build errors for my project:
Error: node_modules/@toast-ui/editor/types/spec.d.ts:40:41 - error TS2707: Generic type 'Plugin<PluginState>' requires between 0 and 1 type arguments.
40 keymaps(useCommandShortcut: boolean): Plugin<any, any>[];
~~~~~~~~~~~~~~~~
Error: node_modules/@toast-ui/editor/types/editor.d.ts:315:47 - error TS2707: Generic type 'Plugin<PluginState>' requires between 0 and 1 type arguments.
315 createKeymaps(useCommandShortcut: boolean): Plugin<any, any>[];
~~~~~~~~~~~~~~~~
Fix
I fixed this by changing the according two lines as follows:
Plugin<any, any>[]; => Plugin<any>[];
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:10
Top Results From Across the Web
Bug: Downstream job fails to update upstream pr #326 - GitHub
I have one job building PR's and it works great, updates commit status on GitHub as expected. It also triggers the downstream job...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@wetternest agree. we need an official way to solve this. not work around.
I have already had a similar problem. The problem comes from a dependency of tui-editor which during installation takes the latest minor version of the prosemirror-transform library which is no longer or not yet compatible with tui-editor. To get around this problem I fixed the version of tui-editor in the package.json :