-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
Node环境
18.20.2、20.12.2、21.17.3 之前的版本即可,例如20.12.1。
备注:
- 其他版本的Node环境下会出现
模板内容拷贝失败的情况。
参考:
吐槽一下问题非常简单;可见这个repo官方平时根本不看 原因是child_process.spawn有漏洞(CVE-2024-27980)-(HIGH),调用要加{ shell: true } 2024.4.10 node修复了这个漏洞,代码执行就报错了 cli下载arco-design-pro-vue执行到.arco-cli\init.js就出现spawn报错 解决办法:node换到4.10前的版本,node-v18.20.1(4.3)测试正常
It is intended behavior for the security patch CVE-2024-27980.
You must pass shell: true in the option on Windows environment if you need to spawn program ended with .bat or .cmd extension.
The patch is deployed in 18.20.2, 20.12.2, 21.17.3 and also 22.0.0
所以使用 18.20.2, 20.12.2, 21.17.3 之前的版本就可以了,arco-cli官方可以赶紧修正吧
Originally posted by @betgar in #92
初始化失败
问题表现:
Roaming\nvm\v20.12.1\node_modules\arco-cli\node_modules\arco-cli-dev-utils\lib\getAnswerFromUser.js:145
const { question: { [command]: questions }, } = yield (0, baseConfig_1.getBaseConfig)();
^
TypeError: Cannot destructure property 'question' of '(intermediate value)' as it is undefined.
解决办法:
cross-env BASE_CONFIG=local arco init <项目名称>
备注:
arco-cli在初始化项目时,如果BASE_CONFIG不为local,会通过远程接口https://arco.design/material/api/cliConfig获取配置信息,但远程接口目前返回的是错误结果,导致初始化过程出现异常。Windows环境下,通过cross-env设置BASE_CONFIG的环境变量值。
参考:
_Originally posted by @oljc in #101
安装cross-env
npm i -g cross-env
youmengme, yuminghui1, jcomey, JonasAi, yhysir and 4 moreHuazeu
Metadata
Metadata
Assignees
Labels
No labels