arco-design / arco-design-pro

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

无法初始化项目 #69

Open gotounix opened 2 years ago

gotounix commented 2 years ago

Basic Info

Steps to reproduce

使用 Node.js v16.15.1初始化项目失败:

$ arco init hello-arco-pro
? 请选择你希望使用的技术栈 Vue
? 请选择所要创建项目的类型 Arco Pro 项目
? 请选择 Arco Pro 模板 简单版(只包含一个基础页面)

正在初始化项目于 E:\Test\hello-arco-pro
√ 获取项目模板成功
× 模板内容拷贝失败
Error: Failed to copy project content.
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.

    at module.exports (C:\Users\Max\.arco_template_cache\1658025588468\node_modules\arco-design-pro-vue\.arco-cli\init.js:25:13)
    at C:\Users\Max\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\Max\AppData\Roaming\npm\node_modules\arco-cli\node_modules\arco-cli-create-project\lib\index.js:5:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
Error: EBUSY: resource busy or locked, rmdir 'C:\Users\Max\.arco_template_cache\1658025588468\node_modules\arco-design-pro-vue'
node:fs:1180
  return handleErrorFromBinding(ctx);
         ^

Error: EBUSY: resource busy or locked, rmdir 'C:\Users\Max\.arco_template_cache\1658025588468\node_modules\arco-design-pro-vue'
    at Object.rmdirSync (node:fs:1180:10)
    at rmdirSync (C:\Users\Max\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:264:13)
    at rimrafSync (C:\Users\Max\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:243:7)
    at C:\Users\Max\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\Max\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:279:26)
    at rmdirSync (C:\Users\Max\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:269:7)
    at rimrafSync (C:\Users\Max\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:243:7)
    at C:\Users\Max\AppData\Roaming\npm\node_modules\arco-cli\node_modules\fs-extra\lib\remove\rimraf.js:279:39
    at Array.forEach (<anonymous>) {
  errno: -4082,
  syscall: 'rmdir',
  code: 'EBUSY',
  path: 'C:\\Users\\Max\\.arco_template_cache\\1658025588468\\node_modules\\arco-design-pro-vue'
}

使用 Node.js v18.6.0 初始化项目成果,但是依赖安装失败:

$ arco init hello-arco-pro
? 请选择你希望使用的技术栈 Vue
? 请选择所要创建项目的类型 Arco Pro 项目
? 请选择 Arco Pro 模板 简单版(只包含一个基础页面)

正在初始化项目于 E:\Test\hello-arco-pro
√ 获取项目模板成功
√ 模板内容拷贝完成
√ 模板内容适配完成
× 项目依赖安失败,你可以稍后尝试手动安装项目依赖
Error: Command 「npm install」 executed failed:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: arco-design-pro-vue@1.0.0
npm ERR! Found: eslint@8.7.0
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^8.7.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^5.16.0 || ^6.8.0 || ^7.2.0" from eslint-config-airbnb-base@14.2.1
npm ERR! node_modules/eslint-config-airbnb-base
npm ERR!   dev eslint-config-airbnb-base@"^14.2.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\Max\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Max\AppData\Local\npm-cache\_logs\2022-07-17T06_02_31_818Z-debug-0.log

 arco-init  项目初始化失败!
Error: spawnSync yarn.cmd ENOENT

手动安装依赖失败:

$ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: arco-design-pro-vue@1.0.0
npm ERR! Found: eslint@8.7.0
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^8.7.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^5.16.0 || ^6.8.0 || ^7.2.0" from eslint-config-airbnb-base@14.2.1
npm ERR! node_modules/eslint-config-airbnb-base
npm ERR!   dev eslint-config-airbnb-base@"^14.2.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\Max\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\Max\AppData\Local\npm-cache\_logs\2022-07-17T06_03_57_177Z-debug-0.log
FlameMida commented 2 years ago

+1

qianjiachun commented 1 year ago

node v16.18.0 同样问题

Error: Command 「npm install」 executed failed:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: arco-design-pro-vue@1.0.0
npm ERR! Found: eslint@8.7.0
npm ERR! node_modules/eslint
npm ERR!   dev eslint@"^8.7.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer eslint@"^5.16.0 || ^6.8.0 || ^7.2.0" from eslint-config-airbnb-base@14.2.1
npm ERR! node_modules/eslint-config-airbnb-base
npm ERR!   dev eslint-config-airbnb-base@"^14.2.1" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR!
npm ERR! See C:\Users\qianjiachun\AppData\Local\npm-cache\eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\qianjiachun\AppData\Local\npm-cache\_logs\2022-10-27T07_58_03_424Z-debug-0.log

 arco-init  项目初始化失败!
Error: spawnSync yarn.cmd ENOENT