Saturday, May 26, 2018

SignalR Core Microsoft tutorial not working for me

The tutorial here says it was created/updated 4 days ago. I'm having trouble executing it.

https://docs.microsoft.com/en-us/aspnet/core/signalr/get-started?view=aspnetcore-2.1&tabs=visual-studio

The error I get is that the line that initializes SignalR on the client side gets an error that "The 'protocol' argument is required.

const connection = new signalR.HubConnection("/chathub", { logger: signalR.LogLevel.Information });

I tried adding a variable inside the second parameter

transport: signalR.TransportType.WebSocket

But it says signalR.TransportType is undefined. I can't find any other suggestions on how to fix this.

https://imgur.com/a/BSnkG0m

The only other warning I get is from NPM when installing the signalr client files.

PM> npm install @aspnet/signalr + @aspnet/signalr@1.0.0-rc1-update1 updated 1 package in 1.161s npm : npm WARN Projects@1.0.0 No description At line:1 char:1 + npm install @aspnet/signalr + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (npm WARN Projects@1.0.0 No description:String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError

npm WARN Projects@1.0.0 No repository field.

SignalR Core Microsoft tutorial not working for me Click here
  • Blogger Comment
  • Facebook Comment

0 comments:

Post a Comment

The webdev Team