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

Cli can't create Vue project on Windows #90

Open
Gaojianli opened this issue Apr 21, 2024 · 11 comments
Open

Cli can't create Vue project on Windows #90

Gaojianli opened this issue Apr 21, 2024 · 11 comments

Comments

@Gaojianli
Copy link

Describe the bug
Try to create an arco pro project, and got a error.

To Reproduce
Steps to reproduce the behavior:

  1. open a folder and run arco init hello-arco-pro
  2. select Arco Pro Project and Full version
  3. got this error, tried twice, reproduced with admin

Expected behavior
The project was successfully created

Desktop (please complete the following information):

  • OS: Windows
  • node version 21.7.3

Additional context

⚡ Gaojianli@PC  ~\..\repos  arco init hello-arco-pro

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

                                                v1.27.5

? The given path already exists, are you sure to overwrite it? C:\Users\Gaojianli\source\repos\hello-arco-pro
Yes
? Please select the framework you want to use Vue
? Please select the type of project you want to create Arco Pro Project
? Please choose the template of Arco Pro Full version (contains all pages)

Initializing the project at C:\Users\Gaojianli\source\repos\hello-arco-pro
✔ Get project template successfully
✖ Failed to copy template content
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\Gaojianli\.arco_template_cache\1713711581322\node_modules\arco-design-pro-vue\.arco-cli\init.js:18:31)
    at C:\Users\Gaojianli\AppData\Roaming\npm\node_modules\arco-cli\node_modules\arco-cli-create-project\lib\index.js:129:23
    at Generator.next (<anonymous>)
    at fulfilled (C:\Users\Gaojianli\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:vite',
    '--',
    '--projectPath=C:\\Users\\Gaojianli\\source\\repos\\hello-arco-pro'
  ]
}
Error: EBUSY: resource busy or locked, rmdir 'C:\Users\Gaojianli\.arco_template_cache\1713711581322\node_modules\arco-design-pro-vue'
node:fs:1216
  binding.rmdir(pathModule.toNamespacedPath(path));
          ^

Error: EBUSY: resource busy or locked, rmdir 'C:\Users\Gaojianli\.arco_template_cache\1713711581322\node_modules\arco-design-pro-vue'
    at Object.rmdirSync (node:fs:1216:11)
    at rmdirSync (C:\Users\Gaojianli\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:264:13)
    at rimrafSync (C:\Users\Gaojianli\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:243:7)
    at C:\Users\Gaojianli\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:279:39
    at Array.forEach (<anonymous>)
    at rmkidsSync (C:\Users\Gaojianli\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:279:26)
    at rmdirSync (C:\Users\Gaojianli\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:269:7)
    at rimrafSync (C:\Users\Gaojianli\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:243:7)
    at C:\Users\Gaojianli\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:279:39
    at Array.forEach (<anonymous>) {
  errno: -4082,
  code: 'EBUSY',
  syscall: 'rmdir',
  path: 'C:\\Users\\Gaojianli\\.arco_template_cache\\1713711581322\\node_modules\\arco-design-pro-vue'
}
@funte
Copy link

funte commented Apr 30, 2024

Same problem in nodejs v20.12.2 + windows11 22h2.

@xixihhhh
Copy link

me too

@liuwanzhen
Copy link

me to

@343829084
Copy link

me too

3 similar comments
@freezeChen
Copy link

me too

@hanzhi-hub
Copy link

me too

@dangweiwu
Copy link

me too

@343136121
Copy link

me too +10086

@limaodaxia
Copy link

I also encountered this problem.

@betgar
Copy link

betgar commented Jul 15, 2024

看这里
#92 (comment)

@Hyperpepe
Copy link

我的解决方法:
1安装nvm,卸载最新从22.x.x
2使用nvm安装18.18.1
3运行init
4成功

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