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

vite init fail. #95

Open
windf17 opened this issue Aug 12, 2024 · 5 comments
Open

vite init fail. #95

windf17 opened this issue Aug 12, 2024 · 5 comments

Comments

@windf17
Copy link

windf17 commented Aug 12, 2024

Describe the bug
vite init robot-front

arco init robot-front

    ___                    ____            _
   /   |  ______________  / __ \___  _____(_)___ _____
  / /| | / ___/ ___/ __ \/ / / / _ \/ ___/ / __ `/ __ \
 / ___ |/ /  / /__/ /_/ / /_/ /  __(__  ) / /_/ / / / /
/_/  |_/_/   \___/\____/_____/\___/____/_/\__, /_/ /_/
                                         /____/

                                            v1.27.5

? 请选择你希望使用的技术栈 React
? 请选择所要创建项目的类型 Arco Pro 项目
? 请选择你想要使用的开发框架 Vite (https://vitejs.dev/)
? 请选择 Arco Pro 模板 简单版(只包含一个基础页面)

正在初始化项目于 E:\works\robots\robot-front
✔ 获取项目模板成功
✖ 模板内容拷贝失败
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\冯征.arco_template_cache\1723451754126\node_modules\arco-design-pro.arco-cli\init.js:18:31)
at D:\dev\pnpm\global\5.pnpm\[email protected]\node_modules\arco-cli-create-project\lib\index.js:129:23
at Generator.next ()
at fulfilled (D:\dev\pnpm\global\5.pnpm\[email protected]\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=E:\works\robots\robot-front',
'--simple'
]
}
Error: EBUSY: resource busy or locked, rmdir 'C:\Users\冯征.arco_template_cache\1723451754126\node_modules\arco-design-pro'
node:fs:1215
binding.rmdir(pathModule.toNamespacedPath(path));
^

Error: EBUSY: resource busy or locked, rmdir 'C:\Users\冯征.arco_template_cache\1723451754126\node_modules\arco-design-pro'
at Object.rmdirSync (node:fs:1215:11)
at rmdirSync (D:\dev\pnpm\global\5.pnpm\[email protected]\node_modules\fs-extra\lib\remove\rimraf.js:264:13)
at rimrafSync (D:\dev\pnpm\global\5.pnpm\[email protected]\node_modules\fs-extra\lib\remove\rimraf.js:243:7)
at D:\dev\pnpm\global\5.pnpm\[email protected]\node_modules\fs-extra\lib\remove\rimraf.js:279:39
at Array.forEach ()
at rmkidsSync (D:\dev\pnpm\global\5.pnpm\[email protected]\node_modules\fs-extra\lib\remove\rimraf.js:279:26)
at rmdirSync (D:\dev\pnpm\global\5.pnpm\[email protected]\node_modules\fs-extra\lib\remove\rimraf.js:269:7)
at rimrafSync (D:\dev\pnpm\global\5.pnpm\[email protected]\node_modules\fs-extra\lib\remove\rimraf.js:243:7)
at D:\dev\pnpm\global\5.pnpm\[email protected]\node_modules\fs-extra\lib\remove\rimraf.js:279:39
at Array.forEach () {
errno: -4082,
code: 'EBUSY',
syscall: 'rmdir',
path: 'C:\Users\冯征\.arco_template_cache\1723451754126\node_modules\arco-design-pro'
}

Node.js v20.16.0

My operating system is win11, and my username contains Chinese characters.
The above error may be caused by the path where the temporary file was created during the initialization of the arco project contains Chinese characters.
It is recommended that arco cli add an option to configure the historical file storage path for project initialization, or just place temporary files in the current directory.

@Lukedu-oocl
Copy link

same

@SUNbrightness
Copy link

don't use chinese folder path!!!!!!!!!!!!!!!!!

@Lukedu-oocl
Copy link

don't use chinese folder path!!!!!!!!!!!!!!!!!
still fail

PS C:\Users\Fatemin\OneDrive\JS\react> arco init hello-arco-pro

    ___                    ____            _
   /   |  ______________  / __ \___  _____(_)___ _____
  / /| | / ___/ ___/ __ \/ / / / _ \/ ___/ / __ `/ __ \
 / ___ |/ /  / /__/ /_/ / /_/ /  __(__  ) / /_/ / / / /
/_/  |_/_/   \___/\____/_____/\___/____/_/\__, /_/ /_/
                                         /____/

                                            v1.27.5

? 路径已经存在,确认要覆盖它吗? C:\Users\Fatemin\OneDrive\JS\react\hello-arco-pro Yes
? 请选择你希望使用的技术栈 React
? 请选择所要创建项目的类型 Arco Pro 项目
? 请选择你想要使用的开发框架 Create React App (https://create-react-app.dev)
? 请选择 Arco Pro 模板 完整版(包含所有页面)

正在初始化项目于 C:\Users\Fatemin\OneDrive\JS\react\hello-arco-pro
✔ 获取项目模板成功
✖ 模板内容拷贝失败
Error: spawnSync npm.cmd EINVAL
at Object.spawnSync (node:internal/child_process:1117:20)
at spawnSync (node:child_process:876:24)
at module.exports (C:\Users\Fatemin.arco_template_cache\1724633411056\node_modules\arco-design-pro.arco-cli\init.js:18:31)
at C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\arco-cli-create-project\lib\index.js:129:23
at Generator.next ()
at fulfilled (C:\Users\Fatemin\AppData\Roaming\npm\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:cra',
'--',
'--projectPath=C:\Users\Fatemin\OneDrive\JS\react\hello-arco-pro'
]
}
Error: EBUSY: resource busy or locked, rmdir 'C:\Users\Fatemin.arco_template_cache\1724633411056\node_modules\arco-design-pro'
node:fs:1222
return handleErrorFromBinding(ctx);
^

Error: EBUSY: resource busy or locked, rmdir 'C:\Users\Fatemin.arco_template_cache\1724633411056\node_modules\arco-design-pro'
at Object.rmdirSync (node:fs:1222:10)
at rmdirSync (C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:264:13)
at rimrafSync (C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:243:7)
at C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:279:39
at Array.forEach ()
at rmkidsSync (C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:279:26)
at rmdirSync (C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:269:7)
at rimrafSync (C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:243:7)
at C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:279:39
at Array.forEach () {
errno: -4082,
syscall: 'rmdir',
code: 'EBUSY',
path: 'C:\Users\Fatemin\.arco_template_cache\1724633411056\node_modules\arco-design-pro'
}

Node.js v18.20.4

@SUNbrightness
Copy link

don't use chinese folder path!!!!!!!!!!!!!!!!!
still fail

PS C:\Users\Fatemin\OneDrive\JS\react> arco init hello-arco-pro

    ___                    ____            _
   /   |  ______________  / __ \___  _____(_)___ _____
  / /| | / ___/ ___/ __ \/ / / / _ \/ ___/ / __ `/ __ \
 / ___ |/ /  / /__/ /_/ / /_/ /  __(__  ) / /_/ / / / /
/_/  |_/_/   \___/\____/_____/\___/____/_/\__, /_/ /_/
                                         /____/

                                            v1.27.5

? 路径已经存在,确认要覆盖它吗? C:\Users\Fatemin\OneDrive\JS\react\hello-arco-pro Yes ? 请选择你希望使用的技术栈 React ? 请选择所要创建项目的类型 Arco Pro 项目 ? 请选择你想要使用的开发框架 Create React App (https://create-react-app.dev) ? 请选择 Arco Pro 模板 完整版(包含所有页面)

正在初始化项目于 C:\Users\Fatemin\OneDrive\JS\react\hello-arco-pro ✔ 获取项目模板成功 ✖ 模板内容拷贝失败 Error: spawnSync npm.cmd EINVAL at Object.spawnSync (node:internal/child_process:1117:20) at spawnSync (node:child_process:876:24) at module.exports (C:\Users\Fatemin.arco_template_cache\1724633411056\node_modules\arco-design-pro.arco-cli\init.js:18:31) at C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\arco-cli-create-project\lib\index.js:129:23 at Generator.next () at fulfilled (C:\Users\Fatemin\AppData\Roaming\npm\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:cra', '--', '--projectPath=C:\Users\Fatemin\OneDrive\JS\react\hello-arco-pro' ] } Error: EBUSY: resource busy or locked, rmdir 'C:\Users\Fatemin.arco_template_cache\1724633411056\node_modules\arco-design-pro' node:fs:1222 return handleErrorFromBinding(ctx); ^

Error: EBUSY: resource busy or locked, rmdir 'C:\Users\Fatemin.arco_template_cache\1724633411056\node_modules\arco-design-pro' at Object.rmdirSync (node:fs:1222:10) at rmdirSync (C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:264:13) at rimrafSync (C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:243:7) at C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:279:39 at Array.forEach () at rmkidsSync (C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:279:26) at rmdirSync (C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:269:7) at rimrafSync (C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:243:7) at C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:279:39 at Array.forEach () { errno: -4082, syscall: 'rmdir', code: 'EBUSY', path: 'C:\Users\Fatemin.arco_template_cache\1724633411056\node_modules\arco-design-pro' }

Node.js v18.20.4

Me too, but Now I succeed. using node 16.13.2 and pnpm

@windf17
Copy link
Author

windf17 commented Sep 3, 2024

don't use chinese folder path!!!!!!!!!!!!!!!!!
still fail

PS C:\Users\Fatemin\OneDrive\JS\react> arco init hello-arco-pro

    ___                    ____            _
   /   |  ______________  / __ \___  _____(_)___ _____
  / /| | / ___/ ___/ __ \/ / / / _ \/ ___/ / __ `/ __ \
 / ___ |/ /  / /__/ /_/ / /_/ /  __(__  ) / /_/ / / / /
/_/  |_/_/   \___/\____/_____/\___/____/_/\__, /_/ /_/
                                         /____/

                                            v1.27.5

? 路径已经存在,确认要覆盖它吗? C:\Users\Fatemin\OneDrive\JS\react\hello-arco-pro Yes ? 请选择你希望使用的技术栈 React ? 请选择所要创建项目的类型 Arco Pro 项目 ? 请选择你想要使用的开发框架 Create React App (https://create-react-app.dev) ? 请选择 Arco Pro 模板 完整版(包含所有页面)
正在初始化项目于 C:\Users\Fatemin\OneDrive\JS\react\hello-arco-pro ✔ 获取项目模板成功 ✖ 模板内容拷贝失败 Error: spawnSync npm.cmd EINVAL at Object.spawnSync (node:internal/child_process:1117:20) at spawnSync (node:child_process:876:24) at module.exports (C:\Users\Fatemin.arco_template_cache\1724633411056\node_modules\arco-design-pro.arco-cli\init.js:18:31) at C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\arco-cli-create-project\lib\index.js:129:23 at Generator.next () at fulfilled (C:\Users\Fatemin\AppData\Roaming\npm\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:cra', '--', '--projectPath=C:\Users\Fatemin\OneDrive\JS\react\hello-arco-pro' ] } Error: EBUSY: resource busy or locked, rmdir 'C:\Users\Fatemin.arco_template_cache\1724633411056\node_modules\arco-design-pro' node:fs:1222 return handleErrorFromBinding(ctx); ^
Error: EBUSY: resource busy or locked, rmdir 'C:\Users\Fatemin.arco_template_cache\1724633411056\node_modules\arco-design-pro' at Object.rmdirSync (node:fs:1222:10) at rmdirSync (C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:264:13) at rimrafSync (C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:243:7) at C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:279:39 at Array.forEach () at rmkidsSync (C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:279:26) at rmdirSync (C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:269:7) at rimrafSync (C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:243:7) at C:\Users\Fatemin\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:279:39 at Array.forEach () { errno: -4082, syscall: 'rmdir', code: 'EBUSY', path: 'C:\Users\Fatemin.arco_template_cache\1724633411056\node_modules\arco-design-pro' }
Node.js v18.20.4

Me too, but Now I succeed. using node 16.13.2 and pnpm

I use window11,
node --version
v20.16.0
npm --version
10.8.3
I reinstalled the system, but now there are no Chinese characters, and the initialization still fails.

But I can complete the initialization normally in wsl2.

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

3 participants