ITADN

Unrecognized extension value in extension set ([object Object]) for all custom extensions

#1ClosedThimoDEV 创建于 2024-07-26
T
ThimoDEVcommented
### Environment ------------------------------ - Operating System: Windows_NT - Node Version: v20.10.0 - Nuxt Version: 3.12.4 - CLI Version: 3.12.0 - Nitro Version: 2.9.7 - Package Manager: pnpm@9.6.0 - Builder: - - User Config: modules, nuxtCodemirror, devtools, compatibilityDate - Runtime Modules: ../src/module - Build Modules: - ------------------------------ Also with npm ### Reproduction https://stackblitz.com/edit/nuxt-starter-ev2hgm?file=README.md This uses the npm version. The playground in the module with pnpm has the same issue ### Describe the bug Custom extensions when added to the codemirror instance cause a bug with codemirror/state. Usually this happens with mismatching versions around ### Additional context _No response_ ### Logs ```shell-script Error: Unrecognized extension value in extension set ([object Object]). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks. at inner (index.js:2044:23) at inner (index.js:2019:17) at inner (index.js:2019:17) at inner (index.js:2019:17) at flatten (index.js:2048:5) at _Configuration.resolve (index.js:1956:25) at _EditorState.create (index.js:2787:43) at watch.immediate (useNuxtCodeMirror.ts:101:23) at callWithErrorHandling (runtime-core.esm-bundler.js:202:19) at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:209:17) ```
关闭于 2024-07-26 1 条评论