You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using monaco-editor and monaco-editor-webpack-plugin in our codebase. When we upgrade from monaco-editor@0.25.2 to 0.26.0 and we got a failure when building the app in webpack:
ModuleNotFoundError: Module not found: Error: Can't resolve 'path' in '/Users/<username>/projects/legend/studio/node_modules/monaco-editor/esm/vs/language/json/_deps/minimatch'
BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.
If you want to include a polyfill, you need to:
- add a fallback 'resolve.fallback: { "path": require.resolve("path-browserify") }'
- install 'path-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
resolve.fallback: { "path": false }
I looked at the file monaco-editor/esm/vs/language/json/_deps/minimatch and I see this:
I'm afraid Webpack might look past the try .. catch block and yell about path there. Right now my workaround is as suggested in the error message, that is to add resolve.fallback: { "path": false }. I just wonder if this is something you would fix or would you recommend me to look for the answer from the webpack side instead?
Environment
monaco-editor version: 0.26.0 Browser: Chrome Version 91.0.4472.114 (Official Build) (x86_64) OS: Mac OSX 11.4 Webpack: 5.44.0 monaco-editor-webpack-plugin: 4.1.0
The text was updated successfully, but these errors were encountered:
Thanks for reaching out! I had a minimatch related error when publishing monaco-json, but @aeschli fixed it.
Seems like there is something missing. I'll investigate - sorry for the inconvenience.
Issue
We are using
monaco-editor
andmonaco-editor-webpack-plugin
in our codebase. When we upgrade frommonaco-editor@0.25.2
to0.26.0
and we got a failure when building the app in webpack:I looked at the file
monaco-editor/esm/vs/language/json/_deps/minimatch
and I see this:I'm afraid Webpack might look past the
try .. catch
block and yell aboutpath
there. Right now my workaround is as suggested in the error message, that is to addresolve.fallback: { "path": false }
. I just wonder if this is something you would fix or would you recommend me to look for the answer from thewebpack
side instead?Environment
monaco-editor version: 0.26.0
Browser: Chrome Version 91.0.4472.114 (Official Build) (x86_64)
OS: Mac OSX 11.4
Webpack: 5.44.0
monaco-editor-webpack-plugin: 4.1.0
The text was updated successfully, but these errors were encountered: