Unrecognized extension value in extension set ([object Object]). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks

这篇文章发表于 2022年11月30日,星期三,15:06

使用 codemirror 时,添加插件报如下错误:

Unrecognized extension value in extension set ([object Object]). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks

报错信息里提示有多个 @codemirror/state 实例,就是依赖重复问题,执行 npm dedupe 即可

npm dedupe