e-chan1007 / nuxt-monaco-editor

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

Failed to load source map #63

Closed younglet closed 1 month ago

younglet commented 2 months ago

WARN Failed to load source map for /Users/yanglei/Desktop/x/node_modules/.pnpm/monaco-editor@0.52.0/node_modules/monaco-editor/esm/vs/base/common/marked/marked.js. Error: An error occurred while trying to read the map file at marked.umd.js.map Error: ENOENT: no such file or directory, open '/Users/yanglei/Desktop/x/node_modules/.pnpm/monaco-editor@0.52.0/node_modules/monaco-editor/esm/vs/base/common/marked/marked.umd.js.map'

I am just a newbie , can somebody help me = =

masaringr commented 1 month ago

same here. did you find any solution?

wcywin commented 1 month ago

Have the same problem, after updating Nuxt 3 from 3.12.3 to 3.13.2 it seems that Nuxt is looking for a source map that is not in the node_modules/monaco-editor -> Error: ENOENT: no such file or directory: 'node_modules/monaco-editor/esm/vs/base/common/marked/marked.umd.js.map'. The WARN shows up on every hot reload in the terminal.

image

Can anyone take a look into this @e-chan1007 ? :)

e-chan1007 commented 1 month ago

This issue seems to be related to https://github.com/microsoft/monaco-editor/issues/4712. I changed some code of nuxt-monaco-editor in v1.3.0 and that warning did not appear in my environment. Try to use v1.3.1 and if you still get the warning, set the removeSourceMaps option in nuxt.config.ts to true, which was also added in v1.3.1.

wcywin commented 1 month ago

I can confirm that the new version of nuxt-monaco-edtitor 1.3.1 has the warning removed :) Thank you @e-chan1007 !

I believe we could set this issue to closed.