-
Notifications
You must be signed in to change notification settings - Fork 35
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
Could not find 'BlazorExtensions' in 'window' (*Client* mode) #50
Comments
Same error, but using SignalR extension. |
I just hit this error as well 2 days ago. I updated the package now is not working anymore. |
In the meantime I downgrade the package to version 0.4.0 until this gets fixed. |
Have mine working on 3.1 latest preview both client-side Blazor and server-side Blazor work for me. The error message indicates that the javascript required is either not found at the required path or not loaded. |
Yes, the workaround presented by @rovercoder also worked for me: #35 (comment) However, the blazor.extensions.storage.js file (see attachment below) must be always copied to the client's
folder which is not stored in git by default. May I ask for a solution and when a new fixed release will be available? Thanks in advance! Workaround by copying manually this file to \bin\Debug\netstandard2.1\dist_content: |
Folks sorry for the delay. I'm working on a way to make the process of reference the static content (CSS/JS) to the target project the way it expects. It is important to know that Blazor broke every single component when they removed the ability to add the static content using the resources. Now I'm looking for a way to make this happen properly. I can't stand off and ask every developer to manually add entries for the static content on their projects as this break the very nature of Nuget and packages. That is the reason I didn't updated all the packages yet as it is pointless. I'll come out with a proper solution relatively soon. I'll open an issue on the Home repo of this org to let everyone know. Thanks! |
Any news on these topics? |
I just installed the Blazor.Extensions.Storage 1.0.0 package on my Client Blazor Project and I am getting the exception: I added the line below in my index.html and I get a 404 resource not found Error. <script src="_content/Blazor.Extensions.Storage/Storage.js"></script>Is there any way to fix this problem? |
@char8cter download this zip a manual reference it. |
with .net core 3.1 last solution did not working ((( |
I also jumped to the Blazor web assembly RC and got this exception. |
I have the same issue for v |
I have found that too much time have past without fixing this simple bug. I cloned and improved this code removing all JavaScript dependencies please follow my repo and package BlazorBrowserStorage |
BlazorExtensions/Storage 1.1.0-preview3 issue:
Similar to issue #35 "Could not find 'BlazorExtensions' in 'window' (Server mode)", but client side:
After updating from ASP .NET 3.0 to latest 3.1 Microsoft.AspNetCore.Blazor (3.1.0-preview4.19579.2), I had to change the injection to the related interfaces to compile:
using Blazor.Extensions.Storage;
using Blazor.Extensions.Storage.Interfaces;
The first "using" statement seems not necessary any more.
And injection also changed from the class "SessionStorage" to the new interface style "ISessionStorage":
[Inject] protected ISessionStorage SessionStorage { get; set; }
But after compiling successfully, I also receive the following exception (similar to server side issue):
WASM: Microsoft.JSInterop.JSException: Could not find 'BlazorExtensions' in 'window'. blazor.webassembly.js:1:35158
printErr http://localhost:58811/_framework/blazor.webassembly.js:1
put_char http://localhost:58811/_framework/wasm/mono.js:1
write http://localhost:58811/_framework/wasm/mono.js:1
write http://localhost:58811/_framework/wasm/mono.js:1
doWritev http://localhost:58811/_framework/wasm/mono.js:1
_fd_write http://localhost:58811/_framework/wasm/mono.js:1
http://localhost:58811/_framework/wasm/mono.wasm:400200
http://localhost:58811/_framework/wasm/mono.wasm:403904
http://localhost:58811/_framework/wasm/mono.wasm:17263
http://localhost:58811/_framework/wasm/mono.wasm:190639
http://localhost:58811/_framework/wasm/mono.wasm:739184
http://localhost:58811/_framework/wasm/mono.wasm:148347
http://localhost:58811/_framework/wasm/mono.wasm:500900
http://localhost:58811/_framework/wasm/mono.wasm:501148
http://localhost:58811/_framework/wasm/mono.wasm:330473
http://localhost:58811/_framework/wasm/mono.wasm:477291
http://localhost:58811/_framework/wasm/mono.wasm:893930
http://localhost:58811/_framework/wasm/mono.wasm:895281
http://localhost:58811/_framework/wasm/mono.wasm:751234
_mono_background_exec http://localhost:58811/_framework/wasm/mono.js:1
pump_message http://localhost:58811/_framework/wasm/mono.js:1
What is the reasons for this? It seems as if the client side can not access the BlazorExtensions out of the box any more (which worked fine using .NET Core 3.0 and Blazor.Extensions.Storage 1.0).
The text was updated successfully, but these errors were encountered: