jit_nodeValue_4(...).$any is not a function Angular5 jit_nodeValue_4(...).$any is not a function Angular5 angular angular

jit_nodeValue_4(...).$any is not a function Angular5


For me the issue was different.

I was using Angular material menu.In the template the menu declared a local variable like this <mat-menu #share='matMenu'>.share was also the name of the function I wanted to call in the component, which was now overwritten. Changing one of the names fixed this.


This normally happens when you've got two references of different data types with the same name. So you might have a Template Reference Variable of #logout and a button that calls logout() on click. Clicking the button would throw an error like the one you're getting.


Using the command line go to the same directory as the package.json file of the application that you want to update.

Run npm outdated and you will see a list of packages that need updating. My app is fairly new so updating all was not an issue (if you need to update specific packages this will help you). To do a full update run npm update, if you re-run npm outdated you will see everything is up to date, BUT you application may not compile now. The error message I got wasn't very helpful. To resolve this problem check all your import statement are still valid (one of mine was altered in app.module.ts)

import { AppRoutingModule } from './app-routing.module'; was changed to import { AppRoutingModule } from './/app-routing.module';

hope this helps