大老杨
大老杨
  • 发布:2020-12-21 21:39
  • 更新:2021-07-17 20:17
  • 阅读:1634

mac os 下用cli不能创建项目

分类:uni-app

按照指引做下来,选择 hello uni-app 项目模板,报错:

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.

2020-12-21 21:39 负责人:无 分享
已邀请:
大老杨

大老杨 (作者)

好像是 cli-plugin-babel 这个依赖用到了 vue3 的东西,但是我现在用的是 vue2,是不是这个版本有问题?

1***@qq.com

1***@qq.com

请问具体是什么问题呢

该问题目前已经被锁定, 无法添加新回复