docgeni / docgeni

📖 A modern, powerful and out of the box documentation generator for Angular components lib and markdown docs.(现代化的、强大的、开箱即用的 Angular 组件文档生成工具)

Home Page:https://docgeni.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BrowserModule has already been loaded

aset1002 opened this issue · comments

执行完打包语句 docgeni build --configuration production
然后启动服务后 控制台报错
我已经检查过所有的mo模块了 没有重复import BrowserModule 模块
image

我认为是打包后 site/src/app/app.module.ts 里的 BrowserModule, BrowserAnimationsModule 引入导致了问题
image

如果你其他地方没有导入不可能报错的,浏览器的模块必须在根模块导入,这里就是根模块

你可以先先手动把生成的根模块去掉浏览器模块试试,看看哪个地方用了

我又检查了一遍 BrowserModule 没有导入。
只有一个地方导入CommonModule

docgeni serve 启动后页面时正常的大
只有打包docgeni build后报错

删除了.docgeni文件夹下site文件夹 重新build后问题解决了
这个docgeni build 时不会先删除site文件夹 重建吗

Site 文件夹不会整体清除,会清除一些内部的文件夹,每次构建都会生成相关文件覆盖,不确定你这边是组件还是其他地方出的问题。

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.