Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Failed to instantiate module ngSanitize" on fresh development install (docker) #4465

Closed
phdowling opened this issue Dec 18, 2019 · 6 comments

Comments

@phdowling
Copy link

phdowling commented Dec 18, 2019

Issue Summary

On fresh local dev install following https://redash.io/help/open-source/dev-guide/docker the following error message appears after I create an admin account:

angular.js:138 Uncaught Error: [$injector:modulerr] Failed to instantiate module app due to:
Error: [$injector:modulerr] Failed to instantiate module ngSanitize due to:
TypeError: a is not a function
    at E (http://localhost:5000/static/vendors~app.933c8574401a801ed58b.js:129:3912)
    at new <anonymous> (http://localhost:5000/static/vendors~app.933c8574401a801ed58b.js:129:2574)
    at Object.instantiate (http://localhost:5000/static/vendors~app.933c8574401a801ed58b.js:123:26367)
    at m (http://localhost:5000/static/vendors~app.933c8574401a801ed58b.js:123:24521)
    at Object.provider (http://localhost:5000/static/vendors~app.933c8574401a801ed58b.js:123:24449)
    at r (http://localhost:5000/static/vendors~app.933c8574401a801ed58b.js:123:25434)
    at http://localhost:5000/static/vendors~app.933c8574401a801ed58b.js:123:25041
    at k (http://localhost:5000/static/vendors~app.933c8574401a801ed58b.js:123:1542)
    at y (http://localhost:5000/static/vendors~app.933c8574401a801ed58b.js:123:24919)
    at http://localhost:5000/static/vendors~app.933c8574401a801ed58b.js:123:25005

https://errors.angularjs.org/1.7.9/$injector/modulerr?p0=app&p1=Error%3A%20%5B%24injector%3Amodulerr%5D%20Failed%20to%20instantiate%20module%20ngSanitize%20due%20to%3A%0ATypeError%3A%20a%20is%20not%20a%20function%0A%20%20%20%20at%20E%20(http%3A%2F%2Flocalhost%3A5000%2Fstatic%2Fvendors~app.933c8574401a801ed58b.js%3A129%3A3912)%0A%20%20%20%20at%20new%20%3Canonymous%3E%20(http%3A%2F%2Flocalhost%3A5000%2Fstatic%2Fvendors~app.933c8574401a801ed58b.js%3A129%3A2574)%0A%20%20%20%20at%20Object.instantiate%20(http%3A%2F%2Flocalhost%3A5000%2Fstatic%2Fvendors~app.933c8574401a801ed58b.js%3A123%3A26367)%0A%20%20%20%20at%20m%20(http%3A%2F%2Flocalhost%3A5000%2Fstatic%2Fvendors~app.933c8574401a801ed58b.js%3A123%3A24521)%0A%20%20%20%20at%20Object.provider%20(http%3A%2F%2Flocalhost%3A5000%2Fstatic%2Fvendors~app.933c8574401a801ed58b.js%3A123%3A24449)%0A%20%20%20%20at%20r%20(http%3A%2F%2Flocalhost%3A5000%2Fstatic%2Fvendors~app.933c8574401a801ed58b.js%3A123%3A25434)%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A5000%2Fstatic%2Fvendors~app.933c8574401a801ed58b.js%3A123%3A25041%0A%20%20%20%20at%20k%20(http%3A%2F%2Flocalhost%3A5000%2Fstatic%2Fvendors~app.933c8574401a801ed58b.js%3A123%3A1542)%0A%20%20%20%20at%20y%20(http%3A%2F%2Flocalhost%3A5000%2Fstatic%2Fvendors~app.933c8574401a801ed58b.js%3A123%3A24919)%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A5000%2Fstatic%2Fvendors~app.933c8574401a801ed58b.js%3A123%3A25005%0Ahttps%3A%2F%2Ferrors.angularjs.org%2F1.7.9%2F%24injector%2Fmodulerr%3Fp0%3DngSanitize%26p1%3DTypeError%253A%2520a%2520is%2520not%2520a%2520function%250A%2520%2520%2520%2520at%2520E%2520(http%253A%252F%252Flocalhost%253A5000%252Fstatic%252Fvendors~app.933c8574401a801ed58b.js%253A129%253A3912)%250A%2520%2520%2520%2520at%2520new%2520%253Canonymous%253E%2520(http%253A%252F%252Flocalhost%253A5000%252Fstatic%252Fvendors~app.933c8574401a801ed58b.js%253A129%253A2574)%250A%2520%2520%2520%2520at%2520Object.instantiate%2520(http%253A%252F%252Flocalhost%253A5000%252Fstatic%252Fvendors~app.933c8574401a801ed58b.js%253A123%253A26367)%250A%2520%2520%2520%2520at%2520m%2520(http%253A%252F%252Flocalhost%253A5000%252Fstatic%252Fvendors~app.933c8574401a801ed58b.js%253A123%253A24521)%250A%2520%2520%2520%2520at%2520Object.provider%2520(http%253A%252F%252Flocalhost%253A5000%252Fstatic%252Fvendors~app.933c8574401a801ed58b.js%253A123%253A24449)%250A%2520%2520%2520%2520at%2520r%2520(http%253A%252F%252Flocalhost%253A5000%252Fstatic%252Fvendors~app.933c8574401a801ed58b.js%253A123%253A25434)%250A%2520%2520%2520%2520at%2520http%253A%252F%252Flocalhost%253A5000%252Fstatic%252Fvendors~app.933c8574401a801ed58b.js%253A123%253A25041%250A%2520%2520%2520%2520at%2520k%2520(http%253A%252F%252Flocalhost%253A5000%252Fstatic%252Fvendors~app.933c8574401a801ed58b.js%253A123%253A1542)%250A%2520%2520%2520%2520at%2520y%2520(http%253A%252F%252Flocalhost%253A5000%252Fstatic%252Fvendors~app.933c8574401a801ed58b.js%253A123%253A24919)%250A%2520%2520%2520%2520at%2520http%253A%252F%252Flocalhost%253A5000%252Fstatic%252Fvendors~app.933c8574401a801ed58b.js%253A123%253A25005%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A5000%2Fstatic%2Fvendors~app.933c8574401a801ed58b.js%3A123%3A837%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A5000%2Fstatic%2Fvendors~app.933c8574401a801ed58b.js%3A123%3A25263%0A%20%20%20%20at%20k%20(http%3A%2F%2Flocalhost%3A5000%2Fstatic%2Fvendors~app.933c8574401a801ed58b.js%3A123%3A1542)%0A%20%20%20%20at%20y%20(http%3A%2F%2Flocalhost%3A5000%2Fstatic%2Fvendors~app.933c8574401a801ed58b.js%3A123%3A24919)%0A%20%20%20%20at%20http%3A%2F%2Flocalhost%3A5000%2Fstatic%2Fvendors~app.933c8574401a801ed58b.js%3A123%3A25005%0A%20%20%20%20at%20k%20(http%3A%2F%2Flocalhost%3A5000%2Fstatic%2Fvendors~app.933c8574401a801ed58b.js%3A123%3A1542)%0A%20%20%20%20at%20y%20(http%3A%2F%2Flocalhost%3A5000%2Fstatic%2Fvendors~app.933c8574401a801ed58b.js%3A123%3A24919)%0A%20%20%20%20at%20Jt%20(http%3A%2F%2Flocalhost%3A5000%2Fstatic%2Fvendors~app.933c8574401a801ed58b.js%3A123%3A24248)%0A%20%20%20%20at%20i%20(http%3A%2F%2Flocalhost%3A5000%2Fstatic%2Fvendors~app.933c8574401a801ed58b.js%3A123%3A10374)%0A%20%20%20%20at%20Te%20(http%3A%2F%2Flocalhost%3A5000%2Fstatic%2Fvendors~app.933c8574401a801ed58b.js%3A123%3A10689)
    at http://localhost:5000/static/vendors~app.933c8574401a801ed58b.js:123:837
    at http://localhost:5000/static/vendors~app.933c8574401a801ed58b.js:123:25263
    at k (http://localhost:5000/static/vendors~app.933c8574401a801ed58b.js:123:1542)
    at y (http://localhost:5000/static/vendors~app.933c8574401a801ed58b.js:123:24919)
    at Jt (http://localhost:5000/static/vendors~app.933c8574401a801ed58b.js:123:24248)
    at i (http://localhost:5000/static/vendors~app.933c8574401a801ed58b.js:123:10374)
    at Te (http://localhost:5000/static/vendors~app.933c8574401a801ed58b.js:123:10689)
    at Ae (http://localhost:5000/static/vendors~app.933c8574401a801ed58b.js:123:9932)
    at HTMLDocument.<anonymous> (http://localhost:5000/static/vendors~app.933c8574401a801ed58b.js:123:183677)
    at c (http://localhost:5000/static/vendors~app.933c8574401a801ed58b.js:111:25742)

Steps to Reproduce

Following the steps in the guide linked above. I may have done a "npm audit fix" at one point, but I also deleted all docker containers and images, as well as node_modules after that, did a re-install and the same thing happened again (without audit fix).

Technical details:

  • Redash Version: pulled latest master, running in Chrome
  • Browser/OS: Max OS 10.15.1
  • How did you install Redash: followed the developer docker setup guide linked above

Edit: traced it down a little more precisely, the issue occurs in angular.js at line 5041:
runInvokeQueue(moduleFn._invokeQueue);
in the loadModules() function for the module "ngSanitize". Angular version is 1.7.9

@phdowling
Copy link
Author

I was able to get it running by setting the angular-sanitize version number equal to the angular version number in package.json

@phdowling
Copy link
Author

Also now noticed that the "npm audit fix" must have edited the package.json, explaining why only I encountered this problem. So this is not really a bug, closing.

@shyamssh
Copy link

@phdowling Hey, I am getting this issue. the angular version in packge.json is "~1.5.8". I did the npm audit fix once. But after reading this thread, I reverted changes in package.json, cleaned the modules and again ran "npm run build". In which file I have to make version change?

@arikfr
Copy link
Member

arikfr commented Feb 19, 2020

Are you sure you're using recent version of the code? Current master branch has no Angular dependencies.

@shyamssh
Copy link

@arikfr my setup was redash version 8.0 and node version was 10.0. I upgraded node version to 12.0 and I did not get this issue.

@shnayan
Copy link

shnayan commented Apr 8, 2020

Did you ever fix your issue? I am also getting the same error. V 8.0

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

No branches or pull requests

4 participants