blazorbootstrap-starter-templates icon indicating copy to clipboard operation
blazorbootstrap-starter-templates copied to clipboard

Could not find window.blazorBootsrap.collapse.initialize ('blazorBootsrap' was undefined)

Open alexnayberg opened this issue 6 months ago • 4 comments

Hello, I just installed BlazorBootstrap on a Blazor Web App project on .Net 8. I am having a problem with a component that's using Accordion. This is the error I am seeing:

Error: Microsoft.JSInterop.JSException: Could not find 'window.blazorBootstrap.collapse.initialize' ('blazorBootstrap' was undefined). Error: Could not find 'window.blazorBootstrap.collapse.initialize' ('blazorBootstrap' was undefined). at https://localhost:7281/_framework/blazor.web.js:1:734 at Array.forEach () at l.findFunction (https://localhost:7281/_framework/blazor.web.js:1:702) at b (https://localhost:7281/_framework/blazor.web.js:1:5445) at https://localhost:7281/_framework/blazor.web.js:1:3238 at new Promise () at y.beginInvokeJSFromDotNet (https://localhost:7281/_framework/blazor.web.js:1:3201) at fn._invokeClientMethod (https://localhost:7281/_framework/blazor.web.js:1:62541) at fn._processIncomingData (https://localhost:7281/_framework/blazor.web.js:1:60016) at connection.onreceive (https://localhost:7281/_framework/blazor.web.js:1:53657) at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args) at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args) at BlazorBootstrap.Collapse.<OnInitializedAsync>b__4_0() at BlazorBootstrap.BlazorBootstrapComponentBase.OnAfterRenderAsync(Boolean firstRender) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

I tried it in both Server and WebAssembly projects, and got the error in both. I followed your instructions to make sure I didn't miss anything: Getting Started.

alexnayberg avatar Dec 31 '23 04:12 alexnayberg