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

arco init 报错, 模板内容拷贝失败,发现很多人都有这个问题还没有解决么 #391

Open
1 task
guoyanlongwork opened this issue Jul 26, 2024 · 9 comments

Comments

@guoyanlongwork
Copy link

Basic Info

Extra info

环境: windows node:20.12.2 npm:10.8.2 尝试重启电脑仍然无效

What is expected?

✔ 获取项目模板成功
✖ 模板内容拷贝失败
Error: spawnSync npm.cmd EINVAL
at Object.spawnSync (node:internal/child_process:1124:20)
at spawnSync (node:child_process:876:24)
at module.exports (C:\Users\Administrator.arco_template_cache\1721960628852\node_modules\arco-design-pro-vue.arco-cli\init.js:18:31)
at D:\Users\Administrator\AppData\Roaming\nvm\v20.12.2\node_modules\arco-cli\node_modules\arco-cli-create-project\lib\index.js:129:23
at Generator.next ()
at fulfilled (D:\Users\Administrator\AppData\Roaming\nvm\v20.12.2\node_modules\arco-cli\node_modules\arco-cli-create-project\lib\index.js:5:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
errno: -4071,
code: 'EINVAL',
syscall: 'spawnSync npm.cmd',
path: 'npm.cmd',
spawnargs: [
'run',
'gen:vite',
'--',
'--projectPath=C:\Users\Administrator\hello-arco-pro'
]
}
Error: EBUSY: resource busy or locked, rmdir 'C:\Users\Administrator.arco_template_cache\1721960628852\node_modules\arco-design-pro-vue'
node:fs:1216
binding.rmdir(pathModule.toNamespacedPath(path));
^

Error: EBUSY: resource busy or locked, rmdir 'C:\Users\Administrator.arco_template_cache\1721960628852\node_modules\arco-design-pro-vue'
at Object.rmdirSync (node:fs:1216:11)
at rmdirSync (D:\Users\Administrator\AppData\Roaming\nvm\v20.12.2\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:264:13)
at rimrafSync (D:\Users\Administrator\AppData\Roaming\nvm\v20.12.2\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:243:7)
at D:\Users\Administrator\AppData\Roaming\nvm\v20.12.2\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:279:39
at Array.forEach ()
at rmkidsSync (D:\Users\Administrator\AppData\Roaming\nvm\v20.12.2\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:279:26)
at rmdirSync (D:\Users\Administrator\AppData\Roaming\nvm\v20.12.2\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:269:7)
at rimrafSync (D:\Users\Administrator\AppData\Roaming\nvm\v20.12.2\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:243:7)
at D:\Users\Administrator\AppData\Roaming\nvm\v20.12.2\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:279:39
at Array.forEach () {
errno: -4082,
code: 'EBUSY',
syscall: 'rmdir',
path: 'C:\Users\Administrator\.arco_template_cache\1721960628852\node_modules\arco-design-pro-vue'
}

Node.js v20.12.2

Steps to reproduce

arco init

@betgar
Copy link

betgar commented Jul 26, 2024

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

@betgar
Copy link

betgar commented Jul 26, 2024

我已经放弃使用这个脚手架了

@guoyanlongwork
Copy link
Author

我也想放弃, 但是不知道什么方式能够初始化 arco-pro 项目, 给分享一下

@betgar
Copy link

betgar commented Jul 26, 2024

我也想放弃, 但是不知道什么方式能够初始化 arco-pro 项目, 给分享一下

  1. 执行arco-cli之前切换的node.js版本,切换到 18.20.2, 20.12.2, 21.17.3 之前 的版本就可以了,就不会报错了,只有windows有这个问题
  2. 之后你还会遇到,编译失败的问题,JSX类型隐式声明的报错,Vue 3.4 开始,Vue 不再隐式注册全局 JSX 命名空间
{
  "compilerOptions": {
    "jsx": "preserve",
    "jsxImportSource": "vue"
    // ...
  }
}
  1. 还有修改样式之后提交,还会遇到,stylelint --fix: TypeError: opts.node.rangeBy is not a function

@guoyanlongwork
Copy link
Author

你这说的我都不敢用他这个ui框架了 我刚切换了v17.9.1仍然会报错 不过换了一个其他的错误

@betgar
Copy link

betgar commented Jul 26, 2024

你这说的我都不敢用他这个ui框架了 我刚切换了v17.9.1仍然会报错 不过换了一个其他的错误

哈哈哈,那我没遇到其它的错误。我已经放弃了,因为看官方的态度,已经没人管了。而且vite还在3.2版本。你可以看看这个脚手架,我用这个vben

@guoyanlongwork
Copy link
Author

好的 感谢

@kvoon3
Copy link

kvoon3 commented Oct 17, 2024

可以试试 degit 直接克隆这个项目里的模板

npm install -g degit
degit arco-design/arco-design-pro-vue/arco-design-pro-vite YOUR_PROJECT_NAME

@GenJi77JYXC
Copy link

我用node的v20.10.0版本成功了,其中还有一点是你可以看看你win11系统下有没有打开的记事本没关,我感觉我的问题可能是我用记事本打开过arco的文件,然后直接点的记事本右上角的×,一下子关闭了整个记事本,但实际上记事本的每个小应用都没关,然后我一个一个的关闭记事本就成功了,不知道有没有记事本的因素,可以试试

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

No branches or pull requests

4 participants