Thck
Thck
  • 发布:2022-10-12 09:18
  • 更新:2023-08-09 14:35
  • 阅读:1868

uniapp vue3版本 cli 安装pinia失败 需要将npm版本降低到6.14.17才可正常安装

分类:uni-app

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: uni-preset-vue@0.0.0
npm ERR! Found: vue@3.2.39
npm ERR! node_modules/vue
npm ERR! peer vue@"^3.2.25" from @vitejs/plugin-vue@2.3.4
npm ERR! node_modules/@vitejs/plugin-vue
npm ERR! @vitejs/plugin-vue@"^2.3.3" from @dcloudio/uni-app-vite@3.0.0-alpha-3060320220919001
npm ERR! node_modules/@dcloudio/uni-app-vite
npm ERR! @dcloudio/uni-app-vite@"3.0.0-alpha-3060320220919001" from @dcloudio/uni-app-plus@3.0.0-alpha-3060320220919001
npm ERR! node_modules/@dcloudio/uni-app-plus
npm ERR! @dcloudio/uni-app-plus@"^3.0.0-alpha-3060320220919001" from the root project
npm ERR! @vitejs/plugin-vue@"^2.3.3" from @dcloudio/vite-plugin-uni@3.0.0-alpha-3060320220919001
npm ERR! node_modules/@dcloudio/vite-plugin-uni
npm ERR! dev @dcloudio/vite-plugin-uni@"^3.0.0-alpha-3060320220919001" from the root project
npm ERR! peer vue@"3.2.39" from @vue/server-renderer@3.2.39
npm ERR! node_modules/@vue/server-renderer
npm ERR! @vue/server-renderer@"3.2.39" from @dcloudio/uni-cli-shared@3.0.0-alpha-3060320220919001
npm ERR! node_modules/@dcloudio/uni-cli-shared
npm ERR! @dcloudio/uni-cli-shared@"3.0.0-alpha-3060320220919001" from @dcloudio/uni-app-vite@3.0.0-alpha-3060320220919001
npm ERR! node_modules/@dcloudio/uni-app-vite
npm ERR! @dcloudio/uni-app-vite@"3.0.0-alpha-3060320220919001" from @dcloudio/uni-app-plus@3.0.0-alpha-3060320220919001
npm ERR! node_modules/@dcloudio/uni-app-plus
npm ERR! 18 more (@dcloudio/uni-automator, @dcloudio/uni-cloud, ...)
npm ERR! @vue/server-renderer@"3.2.39" from @dcloudio/uni-h5@3.0.0-alpha-3060320220919001
npm ERR! node_modules/@dcloudio/uni-h5
npm ERR! @dcloudio/uni-h5@"^3.0.0-alpha-3060320220919001" from the root project
npm ERR! 2 more (@dcloudio/uni-h5-vite, vue)
npm ERR! 4 more (vue-i18n, vue-router, vuex, the root project)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! pinia@"" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: vue@3.2.40
npm ERR! node_modules/vue
npm ERR! peer vue@">= 2.5 < 2.7" from @vue/composition-api@1.7.1
npm ERR! node_modules/@vue/composition-api
npm ERR! peerOptional @vue/composition-api@"^1.4.0" from pinia@2.0.23
npm ERR! node_modules/pinia
npm ERR! pinia@"
" 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.

使用npx degit dcloudio/uni-preset-vue#vite-ts my-vue3-project安装的项目

2022-10-12 09:18 负责人:无 分享
已邀请:
h***@163.com

h***@163.com

感谢,搞个项目真艰难

4***@qq.com

4***@qq.com

降低了npm版本也不行啊,还是报错

要回复问题请先登录注册