Error @types/signalr/index.d.ts is no ta module

1k views Asked by At

I'm trying to use signalr with Typescript. Server side is ASP.NET (not ASP.NET CORE) I installed both signalR (https://www.npmjs.com/package/signalr) and @types/signalr (https://www.npmjs.com/package/@types/signalr).

My import looks like this:

import * as signalR from 'signalr';

The problem is I got an error: "File '... /node_modules/@types/signalr/index.d.ts' is not a module.

Not sure what to do about this. It's only with signalR library I have this problem.

1

There are 1 answers

2
Maxim Alexeyev On BEST ANSWER

Simply using import 'signalr' worked.