I am trying to get signalr to work with Aurelia.
I am using typescript.
My import looks like this
import * as signalR from ‘@aspnet/signalr’;
I have added this to my aurelia.json
Refused to execute script from ‘http://localhost:7070/src/@aspnet/signalr.js’ because its MIME type (‘text/html’) is not executable, and strict MIME type checking is enabled.
Is the “/” messing up the import?
If you want it working now, try auto tracing cli, it should work for scoped npm package. It’s going to be released in few weeks time. BTW, with auto-tracing, you can remove the config for signalr (and many others) from
Please read the second post in the PR for testing it.
"aurelia-cli": "huochunpeng/cli#at47", reinstall packages.
Your app should work without any modification. Then you can start trimming off dependencies from
aurelia.json to take advantage of auto-tracing.
Let me know if you encounter any bug.
Furthermore, turn on cache to see performance boost, update
"cache": "dev & stage"
"cache":true if you want cache for every env
BTW, for existing cli, you should not include
.js in package name, try
The “.js” was it.
I know better too.
Thanks for the help!
PS I will check out the auto tracing cli