swagger 无法运行openapi-generator-config

vojdkbi0  于 11个月前  发布在  其他
关注(0)|答案(2)|浏览(94)

我需要通过openapi-generator-configuration生成API的ts方案,但出现错误。
我通过npm全局安装了openapi-generator-axios。然后我在我的React项目的根文件夹中添加了名为swagger.json的文件。当运行命令“openapi-generator-axios generate -i swagger.json -g typescript-axios -o src/api”时发生错误:

C:\Users\[I am]\AppData\Roaming\npm\node_modules\@openapitools\openapi-generator-cli\main.js:673
                error ? reject(new Error(stderr)) : resolve(stdout);
                               ^

Error: "java" �� ���� ����७��� ��� ���譥�
��������, �ᯮ��塞�� �ணࠬ��� ��� ������ 䠩���.

    at C:\Users\[I am]\AppData\Roaming\npm\node_modules\@openapitools\openapi-generator-cli\main.js:673:32
    at ChildProcess.exithandler (node:child_process:430:5)
    at ChildProcess.emit (node:events:514:28)
    at maybeClose (node:internal/child_process:1105:16)
    at Socket.<anonymous> (node:internal/child_process:457:11)
    at Socket.emit (node:events:514:28)
    at Pipe.<anonymous> (node:net:337:12)

字符串
请告诉我怎么了?

相关问题