fjc0k / docker-YApi

接口管理平台 YApi 的 Docker 镜像。
https://hub.docker.com/r/jayfong/yapi/tags
MIT License
1.1k stars 262 forks source link

如何添加yapi-plugin-export-docx-data插件 #38

Closed ricklii closed 4 years ago

ricklii commented 4 years ago

如题

按照- YAPI_PLUGINS=[{"name":"yapi-plugin-export-docx-data"},日志出现:

yapi-web | Error: 初始化管理员账号 "xx@tt.com" 失败, E11000 duplicate key error collection: yapi.user index: email_1 dup key: { email: "xx@tt.com" } yapi-web | at /yapi/vendors/server/install.js:146:17 yapi-web | at processTicksAndRejections (internal/process/task_queues.js:97:5) yapi-web | yapi-web | 关闭引导服务... yapi-web | 尝试启动 YApi... yapi-web | (node:1) UnhandledPromiseRejectionWarning: Error: Cannot find module 'yapi-plugin-yapi-plugin-export-docx-data'

另外,这个插件似乎“需要在vendors目录下新建input.docx模板文件

fjc0k commented 4 years ago

把前缀 yapi-plugin- 去掉,细看文档。

另外,这个插件似乎“需要在vendors目录下新建input.docx模板文件”

你可以通过 volumes 把 input.docx 映射进去。

volumes:
  - ./input.docx:/yapi/vendors/input.docx
ricklii commented 4 years ago

非常感谢!

momomobinx commented 1 year ago

把前缀 yapi-plugin- 去掉,细看文档。

另外,这个插件似乎“需要在vendors目录下新建input.docx模板文件”

你可以通过 volumes 把 input.docx 映射进去。

volumes:
  - ./input.docx:/yapi/vendors/input.docx

这个yapi 版本是多少,现在新的yapi的格式好像对不上

weiyuanli commented 5 months ago

8 silly fetchPackageMetaData error for url-loader@0.5.9 request to https://registry.npm.taobao.org/url-loader failed 1939 silly fetchPackageMetaData error for yapi-plugin-add-user@latest request to https://registry.npm.taobao.org/yapi-p 1940 timing stage:rollbackFailedOptional Completed in 0ms 1941 timing stage:runTopLevelLifecycles Completed in 3290ms 1942 silly saveTree yapi-vendor@1.10.2 1943 verbose type system 1944 verbose stack FetchError: request to https://registry.npm.taobao.org/ajv-i18n failed, reason: certificate has expi 1944 verbose stack at ClientRequest. (/usr/local/lib/node_modules/npm/node_modules/node-fetch-npm/src/in 1944 verbose stack at ClientRequest.emit (events.js:310:20) 1944 verbose stack at TLSSocket.socketErrorListener (_http_client.js:426:9) 1944 verbose stack at TLSSocket.emit (events.js:310:20) 1944 verbose stack at emitErrorNT (internal/streams/destroy.js:92:8) 1944 verbose stack at emitErrorAndCloseNT (internal/streams/destroy.js:60:3) 1944 verbose stack at processTicksAndRejections (internal/process/task_queues.js:84:21) 1945 verbose cwd /yapi/vendors 1946 verbose Linux 5.4.0-174-generic 1947 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "--registry" "https://registry.npm.taobao.org" 1948 verbose node v12.16.3 1949 verbose npm v6.14.4 1950 error code CERT_HAS_EXPIRED 1951 error errno CERT_HAS_EXPIRED 1952 error request to https://registry.npm.taobao.org/ajv-i18n failed, reason: certificate has expired 1953 verbose exit [ 1, true ] ~ 大佬们npm源已经换了,还是报源的问题,请拉兄弟一把吧,哪的问题怎么修改下跪谢