使用  ng generate component sticky-table  命令新建一个组件时报错:Could not find an NgModule. Use the skip-import option to skip importing in NgModule.

 

原因是无法找到上级模块的 module(module 的名字不是 app.module.ts);

 

解决办法:指定 module 即可, ng generate component sticky-table --module=main ,我这里 module 的名字是 main.ts。

 

相关文章:

  • 2021-12-01
  • 2021-12-09
  • 2022-12-23
  • 2022-12-23
  • 2022-01-11
  • 2021-05-26
  • 2021-10-07
  • 2021-09-30
猜你喜欢
  • 2022-12-23
  • 2021-11-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-18
相关资源
相似解决方案