npx degit dcloudio/uni-preset-vue#vite-ts my-vue3-project
npm install --save-dev pinia
- 发布:2023-07-04 09:14
- 更新:2024-06-17 15:23
- 阅读:555
产品分类: uniapp/H5
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 10
浏览器平台: Chrome
浏览器版本: 114.0.5735.199(64位)
项目创建方式: CLI
CLI版本号: 4.5.15
操作步骤:
预期结果:
可以正常安装使用
可以正常安装使用
实际结果:
无法安装直接报错
无法安装直接报错
bug描述:
PS D:\unapp-ts> npm install --save-dev pinia
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.47
npm ERR! node_modules/vue
npm ERR! peer vue@"^3.2.25" from @vitejs/plugin-vue@4.2.3
npm ERR! node_modules/@vitejs/plugin-vue
npm ERR! @vitejs/plugin-vue@"^4.0.0" from @dcloudio/uni-app-vite@3.0.0-alpha-3070720230316001
npm ERR! node_modules/@dcloudio/uni-app-vite
npm ERR! @dcloudio/uni-app-vite@"3.0.0-alpha-3070720230316001" from @dcloudio/uni-app-plus@3.0.0-alpha-3070720230316001
npm ERR! node_modules/@dcloudio/uni-app-plus
npm ERR! @dcloudio/uni-app-plus@"3.0.0-alpha-3070720230316001" from the root project
npm ERR! @vitejs/plugin-vue@"^4.0.0" from @dcloudio/vite-plugin-uni@3.0.0-alpha-3070720230316001
npm ERR! node_modules/@dcloudio/vite-plugin-uni
npm ERR! dev @dcloudio/vite-plugin-uni@"3.0.0-alpha-3070720230316001" from the root project
npm ERR! peer vue@"^3.0.0" from @vitejs/plugin-vue-jsx@3.0.1
npm ERR! node_modules/@vitejs/plugin-vue-jsx
npm ERR! @vitejs/plugin-vue-jsx@"^3.0.0" from @dcloudio/vite-plugin-uni@3.0.0-alpha-3070720230316001
npm ERR! node_modules/@dcloudio/vite-plugin-uni
npm ERR! dev @dcloudio/vite-plugin-uni@"3.0.0-alpha-3070720230316001" from the root project
npm ERR! 4 more (@vue/server-renderer, vue-i18n, vue-router, the root project)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! dev pinia@"" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: vue@3.3.4
npm ERR! node_modules/vue
npm ERR! peer vue@"^2.6.14 || ^3.3.0" from pinia@2.1.4
npm ERR! node_modules/pinia
npm ERR! dev 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.
npm ERR!
npm ERR! See C:\Users\Administrator\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\Administrator\AppData\Local\npm-cache_logs\2023-07-04T00_54_55_860Z-debug-0.log
1***@qq.com
pinia版本限制到2.0.33或者2.0.36依然无法安装呢
2023-07-17 16:56
DCloud_UNI_LXH
回复 1***@qq.com: 看下你 vue 安装的什么版本的?降级 vue 3.2.31
2023-07-18 13:33