Skip to content
This repository has been archived by the owner on Jun 17, 2024. It is now read-only.

Failed to instantiate module ngSanitize due to: TypeError: q is not a function #21

Open
crushonme opened this issue May 7, 2020 · 2 comments

Comments

@crushonme
Copy link

Get below error:
angular.js:5062 Uncaught Error: [$injector:modulerr] Failed to instantiate module EMIEModule due to: Error: [$injector:modulerr] Failed to instantiate module ngSanitize due to: TypeError: q is not a function at k (http://localhost:8089/node_modules/angular-sanitize/angular-sanitize.min.js:6:259) at new <anonymous> (http://localhost:8089/node_modules/angular-sanitize/angular-sanitize.min.js:12:3) at Object.instantiate (http://localhost:8089/node_modules/angular/angular.js:5158:14) at provider (http://localhost:8089/node_modules/angular/angular.js:4968:36) at Object.provider (http://localhost:8089/node_modules/angular/angular.js:4960:16) at runInvokeQueue (http://localhost:8089/node_modules/angular/angular.js:5032:35) at http://localhost:8089/node_modules/angular/angular.js:5041:11 at forEach (http://localhost:8089/node_modules/angular/angular.js:387:20) at loadModules (http://localhost:8089/node_modules/angular/angular.js:5022:5) at http://localhost:8089/node_modules/angular/angular.js:5040:40 at http://localhost:8089/node_modules/angular/angular.js:138:12 at http://localhost:8089/node_modules/angular/angular.js:5062:15 at forEach (http://localhost:8089/node_modules/angular/angular.js:387:20) at loadModules (http://localhost:8089/node_modules/angular/angular.js:5022:5) at createInjector (http://localhost:8089/node_modules/angular/angular.js:4939:19) at doBootstrap (http://localhost:8089/node_modules/angular/angular.js:1962:20) at bootstrap (http://localhost:8089/node_modules/angular/angular.js:1983:12) at angularInit (http://localhost:8089/node_modules/angular/angular.js:1868:5) at HTMLDocument.<anonymous> (http://localhost:8089/node_modules/angular/angular.js:36426:5) at j (http://localhost:8089/node_modules/jquery/dist/jquery.min.js:2:27309)

@crushonme
Copy link
Author

crushonme commented May 7, 2020

We can remote the issue by change the version of angular-sanitize to 1.7.9.
And then we will get below error instead:

angular.js:138 Uncaught Error: [$injector:unpr] Unknown provider: $$HashMapProvider <- $$HashMap <- $$animateQueue <- $animate <- $compile <- $$animateQueue
https://errors.angularjs.org/1.7.9/$injector/unpr?p0=%24%24HashMapProvider%20%3C-%20%24%24HashMap%20%3C-%20%24%24animateQueue%20%3C-%20%24animate%20%3C-%20%24compile%20%3C-%20%24%24animateQueue
    at angular.js:138
    at angular.js:4926
    at Object.getService [as get] (angular.js:5086)
    at angular.js:4931
    at getService (angular.js:5086)
    at injectionArgs (angular.js:5111)
    at Object.invoke (angular.js:5135)
    at angular.js:4932
    at getService (angular.js:5086)
    at injectionArgs (angular.js:5111)
(匿名) @ angular.js:138
(匿名) @ angular.js:4926
getService @ angular.js:5086
(匿名) @ angular.js:4931
getService @ angular.js:5086
injectionArgs @ angular.js:5111
invoke @ angular.js:5135
(匿名) @ angular.js:4932
getService @ angular.js:5086
injectionArgs @ angular.js:5111
invoke @ angular.js:5135
(匿名) @ angular.js:4932
getService @ angular.js:5086
injectionArgs @ angular.js:5111
invoke @ angular.js:5135
(匿名) @ angular.js:4932
getService @ angular.js:5086
injectionArgs @ angular.js:5111
invoke @ angular.js:5135
doBootstrap @ angular.js:1963
bootstrap @ angular.js:1983
angularInit @ angular.js:1868
(匿名) @ angular.js:36426
j @ jquery.min.js:2
fireWith @ jquery.min.js:2
ready @ jquery.min.js:2
J @ jquery.min.js:2
angular.js:15570 Error: [$templateRequest:tpload] Failed to load template: /App/Views/LoginHome.html (HTTP status: undefined undefined)
https://errors.angularjs.org/1.7.9/$templateRequest/tpload?p0=%2FApp%2FViews%2FLoginHome.html&p1=undefined&p2=undefined
    at angular.js:138
    at handleError (angular.js:21400)
    at processQueue (angular.js:17948)
    at angular.js:17996
    at Scope.$digest (angular.js:19115)
    at Scope.$apply (angular.js:19503)
    at done (angular.js:13346)
    at completeRequest (angular.js:13603)
    at XMLHttpRequest.requestLoaded (angular.js:13508)

@DrKajun
Copy link

DrKajun commented Jun 26, 2020

I had MANY issues getting this to work and this was one. You have to use angular v1.5.11 and angular-sanitize v1.5.11 . I got it 98% working but still may not be good enough for production, the service is failing the schedule. :( I really wanted to use this tool, had great potential.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants