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
I am using Blazor Monaco in a Blazor Server app and experiencing some weird behaviour. When running in Visual Studio, I am getting errors, but when I publish the app, the package works.
When running the project in Visual Studio Blazor Monaco fails to load and I get the follow exception in the console.
fail: Microsoft.AspNetCore.Components.Server.Circuits.CircuitHost[111]
Unhandled exception in circuit '3etjGIvbTp7lHvTo_xh410bBhhmS8PskWVf_CDdaXdw'.
Microsoft.JSInterop.JSException: Could not find 'blazorMonaco.editor.create' ('blazorMonaco' was undefined).
Error: Could not find 'blazorMonaco.editor.create' ('blazorMonaco' was undefined).
at https://localhost:7074/_framework/blazor.server.js:1:497
at Array.forEach (<anonymous>)
at s.findFunction (https://localhost:7074/_framework/blazor.server.js:1:465)
at E (https://localhost:7074/_framework/blazor.server.js:1:2611)
at https://localhost:7074/_framework/blazor.server.js:1:3499
at new Promise (<anonymous>)
at Ft.beginInvokeJSFromDotNet (https://localhost:7074/_framework/blazor.server.js:1:3480)
at Ft._invokeClientMethod (https://localhost:7074/_framework/blazor.server.js:1:75072)
at Ft._processIncomingData (https://localhost:7074/_framework/blazor.server.js:1:72696)
at Ft.connection.onreceive (https://localhost:7074/_framework/blazor.server.js:1:67009)
at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
at BlazorMonaco.Helpers.JsRuntimeExt.SafeInvokeAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
at BlazorMonaco.Editor.Global.Create(IJSRuntime jsRuntime, String domElementId, StandaloneEditorConstructionOptions options, EditorOverrideServices overrideServices, DotNetObjectReference`1 dotnetObjectRef)
at BlazorMonaco.Editor.StandaloneCodeEditor.OnAfterRenderAsync(Boolean firstRender)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)
There was another similar issue about static web assets not being available at the _content/BlazorMonaco/ path. That seems to be related to the app's configuration. The Microsoft doc here has some suggestions which may help.
I am using Blazor Monaco in a Blazor Server app and experiencing some weird behaviour. When running in Visual Studio, I am getting errors, but when I publish the app, the package works.
When running the project in Visual Studio Blazor Monaco fails to load and I get the follow exception in the console.
This is my _Host.cshtml
However, when I publish the app and run the published executable Blazor Monaco works without any issues.
I have tried the following
bin
andobj
folders in the projectThe text was updated successfully, but these errors were encountered: