Error: Unexpected value 'undefined' imported by the module

前端 未结 30 1625
礼貌的吻别
礼貌的吻别 2020-12-01 03:51

I\'m getting this error after migrating to NgModule, the error doesn\'t help too much, any advice please?

Error: Error: Unexpected value \'undefined\' import         


        
30条回答
  •  有刺的猬
    2020-12-01 04:26

    Most probably the error will be related to the AppModule.ts file.

    To solve this issue check whether every component is declared and every service that we declare is put in the providers etc.

    And even if everything seems right in the AppModule file and you still get the error, then stop your running angular instance and restart it once again. That may solve your issue if everything in the module file is correct and if you are still getting the error.

提交回复
热议问题