arco-design / arco-design-pro-vue

An out-of-the-box solution to quickly build enterprise-level applications based on Arco Design.
https://pro.arco.design
MIT License
1.32k stars 271 forks source link

arco init hello-arco-pro failed with spawnSync npm.cmd EINVAL(.arco-cli/init.js) #390

Open betgar opened 1 month ago

betgar commented 1 month ago

Basic Info

Extra info

The patch is deployed in 18.20.2, 20.12.2, 21.17.3 and also 22.0.0. If the node.js version is lower than just mentioned, this bug will not be triggered.

What is expected?

fix it.

Steps to reproduce

You must pass shell: true in the option on Windows environment if you need to spawn or spawnSync program ended with .bat or .cmd extension.

https://github.com/nodejs/node/issues/52681#issuecomment-2076426887

betgar commented 1 month ago

项目初始化失败 spawnSync npm.cmd EINVAL

betgar commented 1 month ago

node.js出现漏洞,修正了之后部署了新版本,在windows上调用spawn和spawnSync接口,必须传递shell: true参数。否则就会报错。

betgar commented 1 month ago

@sHow8e @PengJiyuan

guoyanlongwork commented 1 month ago

所以最后的解决方案是什么 有人帮忙解答一下么

betgar commented 1 month ago

所以最后的解决方案是什么 有人帮忙解答一下么

切换下node.js版本,第一次初始化规避下。使用 18.20.2, 20.12.2, 21.17.3 之前的版本就可以了