core.js:30235 Uncaught TypeError: Cannot read property 'id' of undefined

Viewed 2952

When i execute the ng s --open command, I am getting the browser console error. but there is no errors in the node terminal

Uncaught TypeError: Cannot read property 'id' of undefined
at registerNgModuleType (core.js:30235)
at core.js:30253
at Array.forEach (<anonymous>)
at registerNgModuleType (core.js:30249)
at core.js:30253
at Array.forEach (<anonymous>)
at registerNgModuleType (core.js:30249)
at new NgModuleFactory$1 (core.js:30387)
at compileNgModuleFactory__POST_R3__ (core.js:34669)
at PlatformRef.bootstrapModule (core.js:34966)

But there are no errors when I build the application with ng build --prod what could be the reason for the error , as the same code is executing my other machine Error Screen shot

appplication is also not maiking any API calls

network screen shot

this is where i am getting error in the core.js core.js error

3 Answers

u can delete the node_modules folder and you can do npm install, everything works perfectly

The same problem with me.

Solution:

  1. delete the project
  2. clone project from your repo
  3. npm install
  4. open vscode and select > setting > Online services setting > settings sync > Edit in settings.json and change "angular.experimental-ivy": true to "angular.experimental-ivy": false

I have the same problem.

I tried to delete node_module and do npm install but it is not fixed.

Then, I finally remove @angular/material from package.json and reinstalled using npm install. It is solved.

Related