1.没有在public_api.ts中导出
export * from './src/app/ngprime/components/tooltip/tooltip.module'; export * from './src/app/ngprime/components/tree/tree.module'; export * from './src/app/ngprime/components/upload/upload.module'; export * from './src/app/ngprime/components/table/table.module';
2.package.json中的字段
"packagr": "ng-packagr -p ng-package.json",
3.package.json中依赖的处理
Dependencies--->改为unpeerDependencies
4.最后在dist 目录运行npm pack
5.最后就可在dist 目录下出现*.tgz 文件