e-chan1007 / nuxt-monaco-editor

Integrate monaco-editor with Nuxt
https://e-chan1007.github.io/nuxt-monaco-editor
MIT License
114 stars 15 forks source link

locale file not found #45

Closed transtone closed 5 months ago

transtone commented 9 months ago
  ERROR  Failed to resolve import "monaco-editor-nls/locale/zh-cn.json" from "node_modules\.pnpm\nuxt-monaco-editor@1.2.6_monaco-editor@0.45.0_vite@4.5.1\node_modules\nuxt-monaco-editor\dist\runtime\nls.mjs?v=a493b7b0". Does the file exist?

the doc need update. the right locale name is zh-hans.

==========

when use this settings:

  monacoEditor: { locale: 'de' },

will get


500
nls.localize2 is not a function

at new SelectToBracketAction (http://localhost:3000/_nuxt/node_modules/.pnpm/monaco-editor@0.45.0/node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js?v=05d667ad:47:34)
at registerEditorAction (http://localhost:3000/_nuxt/node_modules/.pnpm/monaco-editor@0.45.0/node_modules/monaco-editor/esm/vs/editor/browser/editorExtensions.js?v=05d667ad:318:20)
at http://localhost:3000/_nuxt/node_modules/.pnpm/monaco-editor@0.45.0/node_modules/monaco-editor/esm/vs/editor/contrib/bracketMatching/browser/bracketMatching.js?v=05d667ad:340:1

the nls.localize2 error seems appear in monaco-editor-0.45.0, when goes back to version 0.39.0, everythings ok.

e-chan1007 commented 5 months ago

It should be fixed in v1.2.9. Please try it.

transtone commented 5 months ago

locale file is fixed.

but a new problem is: the context menu not closed when click the blank.