[Bug] umi-max 集成 @umijs/max-plugin-openapi 插件报错如:Cannot read properties of undefined (reading 'version') #12000
Unanswered
zhaoming1995
asked this question in
Q&A
Replies: 1 comment
-
See #11998 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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.
求助如何解决?
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
Beta Was this translation helpful? Give feedback.
All reactions