Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛[BUG] 生成services,报Error: not support Intl or zh-CN language #8217

Closed
internet5 opened this issue Mar 17, 2021 · 8 comments
Closed
Labels

Comments

@internet5
Copy link

internet5 commented Mar 17, 2021

🐛 bug 描述

当前最新下载的最新pro,填上openapi数组配置后生成,控制台报错Error: not support Intl or zh-CN language

📷 复现步骤

当前最新下载的最新pro,填上openapi数组配置后生成

🏞 期望结果

正常运行

💻 报错信息

[openAPI]: � 将 Swagger 转化为 openAPI
(node:19344) UnhandledPromiseRejectionWarning: Error: not support Intl or zh-CN language.
at parse (D:\CYProjects\cmii-ufb\node_modules\tiny-pinyin\dist\core.js:126:11)
at Object.convertToPinyin (D:\CYProjects\cmii-ufb\node_modules\tiny-pinyin\dist\core.js:139:12)
at resolveTypeName (D:\CYProjects\cmii-ufb\node_modules@umijs\openapi\dist\serviceGenerator.js:32:34)
at D:\CYProjects\cmii-ufb\node_modules@umijs\openapi\dist\serviceGenerator.js:182:33
at Array.forEach ()
at D:\CYProjects\cmii-ufb\node_modules@umijs\openapi\dist\serviceGenerator.js:181:22
at Array.forEach ()
at D:\CYProjects\cmii-ufb\node_modules@umijs\openapi\dist\serviceGenerator.js:171:55
at Array.forEach ()
at new ServiceGenerator (D:\CYProjects\cmii-ufb\node_modules@umijs\openapi\dist\serviceGenerator.js:169:46)
(node:19344) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which
was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 5)

© 版本信息

  • Ant Design Pro 版本: [e.g. 5.0.0-beta.2]

🚑 其他信息

@chenshuai2144
Copy link
Collaborator

这个拼音库看起来还是不够强大

@HengCC
Copy link

HengCC commented Mar 19, 2021

有解决方案吗?

@chenshuai2144
Copy link
Collaborator

升级一下node,或者用 npm i full-icu -g

@GreatAuk
Copy link

升级一下node,或者用 npm i full-icu -g

有版本推荐,或者升级最新版本吗

@chenshuai2144
Copy link
Collaborator

node@14 最合适了

@lahvey
Copy link

lahvey commented Apr 29, 2021

还是换个库吧,centos上npm i full-icu -g也不行,为了这个升级node@14太重了

@leonkong
Copy link

leonkong commented Aug 6, 2021

同样遇到这个问题,node 10.24.1。没法升级node,牵扯太多了。

@GreatAuk
Copy link

GreatAuk commented Aug 6, 2021

同样遇到这个问题,node 10.24.1。没法升级node,牵扯太多了。

nvm 安装多个版本

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants