You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
demo@v1 openapi D:\workbench\Admin-Sys\demo
max openapi
Using openapi Plugin
D:\workbench\Admin-Sys\demo\node_modules.pnpm@umijs+openapi@1.9.4\node_modules@umijs\openapi\dist\serviceGenerator.js:231
this.version = info.version;
^
TypeError: Cannot read properties of undefined (reading 'version')
at new ServiceGenerator (D:\workbench\Admin-Sys\demo\node_modules.pnpm@umijs+openapi@1.9.4\node_modules@umijs\openapi\dist\serviceGenerator.js:231:29)
at D:\workbench\Admin-Sys\demo\node_modules.pnpm@umijs+openapi@1.9.4\node_modules@umijs\openapi\dist\index.js:71:30
at Generator.next ()
at fulfilled (D:\workbench\Admin-Sys\demo\node_modules.pnpm\tslib@2.6.2\node_modules\tslib\tslib.js:166:62)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v18.17.0
ELIFECYCLE Command failed with exit code 1.
What happens?
添加了umi-openapi插件,之后运行pnpm openapi,报错如下
D:\workbench\Admin-Sys\demo>pnpm openapi
Using openapi Plugin
D:\workbench\Admin-Sys\demo\node_modules.pnpm@umijs+openapi@1.9.4\node_modules@umijs\openapi\dist\serviceGenerator.js:231
this.version = info.version;
^
TypeError: Cannot read properties of undefined (reading 'version')
at new ServiceGenerator (D:\workbench\Admin-Sys\demo\node_modules.pnpm@umijs+openapi@1.9.4\node_modules@umijs\openapi\dist\serviceGenerator.js:231:29)
at D:\workbench\Admin-Sys\demo\node_modules.pnpm@umijs+openapi@1.9.4\node_modules@umijs\openapi\dist\index.js:71:30
at Generator.next ()
at fulfilled (D:\workbench\Admin-Sys\demo\node_modules.pnpm\tslib@2.6.2\node_modules\tslib\tslib.js:166:62)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Node.js v18.17.0
ELIFECYCLE Command failed with exit code 1.
求助如何解决?
How To Reproduce
Steps to reproduce the behavior: 1. 2.
Expected behavior 1. 2.
package.json
"dependencies": {
"@ant-design/charts": "^2.0.3",
"@ant-design/icons": "^5.2.6",
"@ant-design/pro-components": "^2.6.43",
"@umijs/max": "^4.0.89",
"@umijs/max-plugin-openapi": "^2.0.3",
"antd": "^5.12.3",
"swagger-ui-dist": "^5.10.5"
},
Context
The text was updated successfully, but these errors were encountered: