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

An unhandled exception occurred: NOT SUPPORTED: keyword "id", use "$id" for schema ID

kemaosen opened this issue · comments

commented

Hi,您好,
我根据官网文档 使用 ng add @docgeni/cli 命令给组件项目添加这个库 遇到报错
An unhandled exception occurred: NOT SUPPORTED: keyword "id", use "$id" for schema ID

这是我angular版本

"dependencies": {
    "@angular/animations": "~13.1.2",
    "@angular/cdk": "~13.1.2",
    "@angular/common": "~13.1.2",
    "@angular/compiler": "~13.1.2",
    "@angular/core": "~13.1.2",
    "@angular/forms": "~13.1.2",
    "@angular/platform-browser": "~13.1.2",
    "@angular/platform-browser-dynamic": "~13.1.2",
    "@angular/router": "~13.1.2",
    "@ant-design/icons-angular": "^13.0.2",
    "@ngx-translate/core": "^13.0.0",
    "@ngx-translate/http-loader": "^6.0.0",
    }
"devDependencies": {
  "@docgeni/cli": "^1.2.0-next.14",
}

我应该怎么做,谢谢

commented

我是否可以忽略这个错误

commented

很抱歉,我没有走到这一步...

执行上述任意一个命令后将自动完成 docgeni 的初始化配置,包括生成配置文件、NPM 启动脚本、默认文档等工作。

第一步选择文档站点模式: full或者lite(默认lite)
第二步输入文档目录 (默认docs)
commented

你好,我今天不信邪又尝试了下其他的方式 使用npx @docgeni/cli init
但是他报错了 该死我看了template用的是ng13呀 但是到我这里怎么就不行了

PS C:\project\xxx-lib> npx @docgeni/cli init
npx: installed 544 in 40.487s
Error: Invalid rule result: Instance of class Promise.

Ng 13版本兼容性有问题,还没有适配升级,你手动添加一下

commented

老哥能否说的详细些 刚入手angular3个月

commented

老哥我使用https://github.com/docgeni/docgeni-template 魔改了一番已经可以让项目跑起来,但是我遇到另一个问题
使用组件文件找不到路径,我提了另外一个issue.这是我的问题还是源码的问题?
如果可以的话我还是希望通过cli 的命令去创建项目使用docgeni。您大概什么时候有时间修复问题,时间紧张我还是尝试手动魔改....

commented

embed 这个组件

Docgeni 的初始化底层使用的是 Angular Cli 的 Schematics ,在13版本中有类库依赖修改导致错误,我还没来得及修复13的兼容性问题,你可以按照文档中手动添加依赖和配置,或者复制模版项目使用

手动添加和使用脚手架没有太大的区别。http://docgeni.com/guides/intro/getting-started 看文档最后部分

commented

好的,您是指手动初始化步骤么。
妈耶,我把这个看漏了......抱歉。我尝试下。非常感谢您

commented

问题已解决,老哥非常的nice!!!