cannot determine the module for component angular 5

后端 未结 12 1989
太阳男子
太阳男子 2020-12-29 20:39

I\'m getting following error when I build the Angular app using \"ng build --prod\". This is working when I build with Angular 4 and getting error with Angular 5. With Angul

12条回答
  •  春和景丽
    2020-12-29 21:17

    Check Case Sensitivity

    import { MyComponent } from "./User/my-component";
    

    In my case, the problem was that the folder user was created with U as capital in my import statement. But actually on disk it was in small case. When I renamed the folder to user (with u lower case) in my import statement also, it worked for me.

    import { MyComponent } from "./user/my-component";
    

    So check the case sensitivity, of your import path.

提交回复
热议问题