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

3

6

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

Saponify answered 17/2, 2021 at 6:17 Comment(0)
B
5

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

Bloodless answered 17/2, 2021 at 10:42 Comment(1)
This works, but what is the reason ?Lighting
K
2

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
Kannan answered 17/2, 2021 at 13:20 Comment(0)
M
1

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.

Mcmullen answered 17/2, 2021 at 12:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.