-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error using Monaco Editor together with Blazorise #81
Comments
Similar problem with Blazorise.Bootstrap 1.2.1 and BlazorMonaco 3.0.0
|
Also having the same issue after upgrading to |
Stuck here as well... |
I have the same problem BlazorMonaco version 3.0.0 |
no expert on JS, but after some digging I think the problem stems from Blazorise using ESM and Monaco using AMD. I have a working application using Blazorise 0.9.3.5 and BlazorMonaco 2.0.0, but I can't upgrade, because it breaks with the same error message you got. Found this and played around according to the suggestions, unsuccessfully unfortunately: microsoft/monaco-editor#2283 |
Stuck as well |
Edit: I was able to find a solution here. According to the solution in #59, you can replace the following scripts: - <script src="_content/BlazorMonaco/lib/monaco-editor/min/vs/loader.js"></script>
- <script src="_content/BlazorMonaco/lib/monaco-editor/min/vs/editor/editor.main.js"></script>
+ <script src="https://cdn.jsdelivr.net/npm/monaco-yaml-prebuilt/dist/monaco-editor.min.js"></script> |
@gt-jkinter - This is great, thanks for sharing! |
I have solved this by replacing the way the JavaScript is bundled. It works in all combinations of Blazorise and Monaco.
Steps:
This includes the original monaco editor sources.
Put the BlazorMonaco script afterwards!
|
Tried to make this work as well. I followed the steps by @joergkrause , but it wasn't fully working for me yet. A few changes I made:
Note that this differs from the original code, found this example at https://github.com/microsoft/monaco-editor/blob/main/samples/browser-esm-webpack-monaco-plugin/webpack.config.js
|
Having the same issue, as @gt-jkinter said, use this CDN fix the issue:
|
Will this ever get fixed within the NuGet package itself? I'm getting this error together with Bootstrap:
Would be awesome if this would work out of the box 😊 |
When adding Monaco Editor to a project that already contains Blazorise I get the following exception in the browser console:
Here is a basic project to reproduce the issue: https://github.com/yuramag/BlazoriseWithMonaco
Seems like there is some sort of conflict between the JS code backing
Tooltip
component andBlazorMonaco
internals. Any suggestion on how to address this problem?The text was updated successfully, but these errors were encountered: