DEV Community

Discussion on: Uncaught TypeError: Cannot read property 'xyz' of undefined

Collapse
 
hankchiutw profile image
Hank Chiu

Try executing npx ngcc manually.

Collapse
 
jwp profile image
John Peters • Edited

The next time I have this issue, I'll definitely try this. I think you are recommending this because it will show more information, right? Does NGCC use a different loader than this one? registerNgModuleType (core.js:36228)

Collapse
 
hankchiutw profile image
Hank Chiu

ngcc would compile your node_modules to be Ivy-compatible. In my case, I just add "postinstall": "ngcc" in package.json scripts to get rid of such errors.

Thread Thread
 
jwp profile image
John Peters

This is not a solution to problem described. Ng build uses ngcc