I'm trying to set a SignalR client in an Angular app. There is Webpack which does the job. And TypeScript, of course.
Package.json is
{
  "private": true,
  "version": "0.0.0",
  "scripts": {
    "test": "karma start ClientApp/test/karma.conf.js"
  },
  "devDependencies" " { ... }
  "dependencies": {
    "@aspnet/signalr": "^1.1.0"
  }
}
The TypeScript code is:
import { HubConnectionBuilder } from '@aspnet/signalr';
@Component({
    selector: 'stream-details',
    templateUrl: './stream-details.component.html'
})
export class StreamDetailsComponent implements OnInit {
    @Input() summary: any;
constructor(private deviceService: StreamService) {
}
ngOnInit() {
    let connection = new HubConnectionBuilder()
        .withUrl('/streamingHub')
        .build()
    connection
        .start()
        .then(() => connection.stream('SubscribeToStream', 'stream123'));
}
}
When the app is running, the error is:
NodeInvocationException: Prerendering failed because of error: Error: Cannot find module './NodeHttpClient'
Why is not this NodeHttpClient.js file included? What do I miss?
This prolem persists right now. There is also an issue on github. The issue is closed however according to my observations the problem still the case.
Downgrading your @aspnet/signalr version to 1.0.0 solving the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With