Closed 0xSa9 closed 2 years ago
这个提示应该是项目已经初始化成功了?感觉是包没下好或者没被resolve,可以删掉node_modules重新install一下试试哈。
我也遇到同样的问题 node版本14.16.1,12.22.9都试了 都报这个错,把项目全部删除,重新生成,问题依旧。
Microsoft Windows [版本 10.0.19044.1586] (c) Microsoft Corporation。保留所有权利。
D:\source>arco init arco-pro-vue
___ ____ _
/ | ______________ / __ \___ _____(_)___ _____
/ /| | / ___/ ___/ __ \/ / / / _ \/ ___/ / __ `/ __ \
/ ___ |/ / / /__/ /_/ / /_/ / __(__ ) / /_/ / / / /
/_/ |_/_/ \___/\____/_____/\___/____/_/\__, /_/ /_/
/____/
v1.26.1
? 请选择使用的 Arco 物料平台版本 公共版本(使用 GitHub 账户授权登录) 已成功切换至公共环境 ? 请选择你希望使用的技术栈 Vue ? 请选择所要创建项目的类型 Arco Pro 项目 ? 请选择 Arco Pro 模板 完整版(包含所有页面)
正在初始化项目于 D:\source\arco-pro-vue ✔ 获取项目模板成功 ✔ 模板内容拷贝完成 ✔ 模板内容适配完成 ✖ 项目依赖安失败,你可以稍后尝试手动安装项目依赖 Command Error: npm install arco-init 项目初始化失败! Error: spawnSync yarn.cmd ENOENT
D:\source>cd arco-pro-vue
D:\source\arco-pro-vue>npm run dev
arco-design-pro-vue@1.0.0 dev vite --config ./config/vite.config.dev.ts
'vite' 不是内部或外部命令,也不是可运行的程序 或批处理文件。
D:\source\arco-pro-vue>npm i 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 D:\App\npm\npm_cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in: npm ERR! D:\App\npm\npm_cache_logs\2022-04-12T03_06_52_708Z-debug-0.log
2022-04-12T03:06:56.882Z
While resolving: arco-design-pro-vue@1.0.0 Found: eslint@8.7.0 node_modules/eslint dev eslint@"^8.7.0" from the root project
Could not resolve dependency: peer eslint@"^5.16.0 || ^6.8.0 || ^7.2.0" from eslint-config-airbnb-base@14.2.1 node_modules/eslint-config-airbnb-base dev eslint-config-airbnb-base@"^14.2.1" from the root project
Fix the upstream dependency conflict, or retry this command with --force, or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution.
Raw JSON explanation object:
{ "code": "ERESOLVE", "current": { "name": "eslint", "version": "8.7.0", "whileInstalling": { "name": "arco-design-pro-vue", "version": "1.0.0", "path": "D:\source\arco-pro-vue" }, "location": "node_modules/eslint", "isWorkspace": false, "dependents": [ { "type": "dev", "name": "eslint", "spec": "^8.7.0", "from": { "location": "D:\source\arco-pro-vue" } } ] }, "currentEdge": { "type": "dev", "name": "eslint", "spec": "^8.7.0", "from": { "location": "D:\source\arco-pro-vue" } }, "edge": { "type": "peer", "name": "eslint", "spec": "^5.16.0 || ^6.8.0 || ^7.2.0", "error": "INVALID", "from": { "name": "eslint-config-airbnb-base", "version": "14.2.1", "whileInstalling": { "name": "arco-design-pro-vue", "version": "1.0.0", "path": "D:\source\arco-pro-vue" }, "location": "node_modules/eslint-config-airbnb-base", "isWorkspace": false, "dependents": [ { "type": "dev", "name": "eslint-config-airbnb-base", "spec": "^14.2.1", "from": { "location": "D:\source\arco-pro-vue" } } ] } }, "strictPeerDeps": false, "force": false }
@gengzhao2020 安装依赖已经是最后的步骤了。如果没成功。先删除node_modules文件夹。换一下npm源,或者使用yarn(推荐)再进行一次安装。
@gengzhao2020 安装依赖已经是最后的步骤了。如果没成功。先删除node_modules文件夹。换一下npm源,或者使用yarn(推荐)再进行一次安装。
用yarn成功了,但是仍然会提示 错误,不过不影响使用
D:\source>arco init arco-design-pro-vue
___ ____ _
/ | ______________ / __ \___ _____(_)___ _____
/ /| | / ___/ ___/ __ \/ / / / _ \/ ___/ / __ `/ __ \
/ ___ |/ / / /__/ /_/ / /_/ / __(__ ) / /_/ / / / /
/_/ |_/_/ \___/\____/_____/\___/____/_/\__, /_/ /_/
/____/
v1.26.1
? 请选择使用的 Arco 物料平台版本 公共版本(使用 GitHub 账户授权登录) 已成功切换至公共环境 ? 请选择你希望使用的技术栈 Vue ? 请选择所要创建项目的类型 Arco Pro 项目 ? 请选择 Arco Pro 模板 完整版(包含所有页面)
正在初始化项目于 D:\source\arco-design-pro-vue ✔ 获取项目模板成功 ✔ 模板内容拷贝完成 ✔ 模板内容适配完成 ✖ 项目依赖安失败,你可以稍后尝试手动安装项目依赖 Command Error: npm install
Read README.md for help information. Execute following command to start $ cd arco-design-pro-vue $ yarn dev
src/views/user/setting/components/user-panel.vue
更改
import { FileItem, RequestOption, } from '@arco-design/web-vue/es/upload/interfaces';
为
import { FileItem, RequestOption, } from '@arco-design/web-vue/es/upload/interfaces.d';
很遗憾现有版本还存在问题
这是对的,考虑修复这个问题吗?
基本信息
npm run dev后出现如下错误信息
The following dependencies are imported but could not be resolved:
@arco-design/web-vue/es/upload/interfaces (imported by D:/Project/vue/pro_sample/src/views/user/setting/components/user-panel.vue?id=0)
Are they installed?
额外补充: CLI选项里面选择"单个页面"后构建的项目就可以正常运行.
"完整版本"不行,希望可以解决问题.