In an AngularJS I'm trying to instantiate angular-jwt. But it fails, although I have in my app.js file:
angular.module('xxx', ['ngRoute', 'angular-jwt'])
.config(config).run(run);
and in my index.html:
...
<script src="node_modules/angular-route/angular-route.js"></script>
<script src="node-modules/angular-jwt/dist/angular-jwt.js"></script>
<script src="angular-app/app.js"></script>
...
Chrome gives the usual error:
Failed to instantiate module xxx due to: Error: [$injector:modulerr] Failed to instantiate module angular-jwt due to: Error: [$injector:nomod] Module 'angular-jwt' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
Firefox is pointing to the real reason? It says:
The resource from “http://localhost:3000/node-modules/angular-jwt/dist/angular-jwt.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
Error: [$injector:modulerr] Failed to instantiate module meanhotel due to:
[$injector:modulerr] Failed to instantiate module angular-jwt due to:
[$injector:nomod] Module 'angular-jwt' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
The version of angular-jwt is angular-jwt@0.1.11. Why is it thinking angular-jwt.js is text/html?