- vue create -p dcloudio/uni-preset-vue uni-app-demo
- 选择 hello uni-app
- 发布:2020-12-22 20:08
- 更新:2021-05-20 15:51
- 阅读:1222
产品分类: uniapp/小程序/微信
PC开发环境操作系统: Mac
PC开发环境操作系统版本号: MacOS 11.1
第三方开发者工具版本号: 1.0.3
基础库版本号: 2.14
项目创建方式: CLI
CLI版本号: @vue/cli 4.4.6
操作步骤:
预期结果:
项目可用
项目可用
实际结果:
报错:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: vue@2.6.12
npm ERR! node_modules/vue
npm ERR! vue@"^2.6.11" from the root project
npm ERR! peer vue@"^2 || ^3.0.0-0" from @vue/babel-preset-app@4.5.9
npm ERR! node_modules/@vue/babel-preset-app
npm ERR! @vue/babel-preset-app@"^4.5.9" from @vue/cli-plugin-babel@4.5.9
npm ERR! node_modules/@vue/cli-plugin-babel
npm ERR! dev @vue/cli-plugin-babel@"~4.5.0" from the root project
npm ERR! 1 more (vuex)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"3.0.4" from @vue/compiler-sfc@3.0.4
npm ERR! node_modules/@vue/compiler-sfc
npm ERR! peer @vue/compiler-sfc@"^3.0.0-beta.14" from @vue/cli-service@4.5.9
npm ERR! node_modules/@vue/cli-service
npm ERR! peer @vue/cli-service@"^3.0.0 || ^4.0.0-0" from @vue/cli-plugin-babel@4.5.9
npm ERR! node_modules/@vue/cli-plugin-babel
npm ERR! dev @vue/cli-plugin-babel@"~4.5.0" from the root project
npm ERR! 3 more (@vue/cli-plugin-router, @vue/cli-plugin-vuex, 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! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: vue@2.6.12
npm ERR! node_modules/vue
npm ERR! vue@"^2.6.11" from the root project
npm ERR! peer vue@"^2 || ^3.0.0-0" from @vue/babel-preset-app@4.5.9
npm ERR! node_modules/@vue/babel-preset-app
npm ERR! @vue/babel-preset-app@"^4.5.9" from @vue/cli-plugin-babel@4.5.9
npm ERR! node_modules/@vue/cli-plugin-babel
npm ERR! dev @vue/cli-plugin-babel@"~4.5.0" from the root project
npm ERR! 1 more (vuex)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"3.0.4" from @vue/compiler-sfc@3.0.4
npm ERR! node_modules/@vue/compiler-sfc
npm ERR! peer @vue/compiler-sfc@"^3.0.0-beta.14" from @vue/cli-service@4.5.9
npm ERR! node_modules/@vue/cli-service
npm ERR! peer @vue/cli-service@"^3.0.0 || ^4.0.0-0" from @vue/cli-plugin-babel@4.5.9
npm ERR! node_modules/@vue/cli-plugin-babel
npm ERR! dev @vue/cli-plugin-babel@"~4.5.0" from the root project
npm ERR! 3 more (@vue/cli-plugin-router, @vue/cli-plugin-vuex, 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.
bug描述:
按照指引做下来,选择 hello uni-app 项目模板,报错,好像是 cli-plugin-babel 这个依赖用到了 vue3 的东西,但是我现在用的是 vue2,是不是这个版本有问题?
错误信息:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! Found: vue@2.6.12
npm ERR! node_modules/vue
npm ERR! vue@"^2.6.11" from the root project
npm ERR! peer vue@"^2 || ^3.0.0-0" from @vue/babel-preset-app@4.5.9
npm ERR! node_modules/@vue/babel-preset-app
npm ERR! @vue/babel-preset-app@"^4.5.9" from @vue/cli-plugin-babel@4.5.9
npm ERR! node_modules/@vue/cli-plugin-babel
npm ERR! dev @vue/cli-plugin-babel@"~4.5.0" from the root project
npm ERR! 1 more (vuex)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"3.0.4" from @vue/compiler-sfc@3.0.4
npm ERR! node_modules/@vue/compiler-sfc
npm ERR! peer @vue/compiler-sfc@"^3.0.0-beta.14" from @vue/cli-service@4.5.9
npm ERR! node_modules/@vue/cli-service
npm ERR! peer @vue/cli-service@"^3.0.0 || ^4.0.0-0" from @vue/cli-plugin-babel@4.5.9
npm ERR! node_modules/@vue/cli-plugin-babel
npm ERR! dev @vue/cli-plugin-babel@"~4.5.0" from the root project
npm ERR! 3 more (@vue/cli-plugin-router, @vue/cli-plugin-vuex, 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.
1 个回复
1***@qq.com
请问你解决了这个问题了吗?我也出现了这个bug