package.json:
{
"name": "uni-preset-vue",
"version": "0.0.0",
"scripts": {
"dev:mp-weixin": "uni -p mp-weixin",
"dev:mp-weixin-stag": "uni build -p mp-weixin --mode staging",
"build:mp-weixin-stag": "uni build -p mp-weixin --mode staging",
"build:mp-weixin-prod": "uni build -p mp-weixin --mode production",
"type-check": "vue-tsc --noEmit"
},
"dependencies": {
"@dcloudio/uni-app": "3.0.0-alpha-3061620221230002",
"@dcloudio/uni-app-plus": "3.0.0-alpha-3061620221230002",
"@dcloudio/uni-components": "3.0.0-alpha-3061620221230002",
"@dcloudio/uni-h5": "3.0.0-alpha-3061620221230002",
"@dcloudio/uni-mp-alipay": "3.0.0-alpha-3061620221230002",
"@dcloudio/uni-mp-baidu": "3.0.0-alpha-3061620221230002",
"@dcloudio/uni-mp-kuaishou": "3.0.0-alpha-3061620221230002",
"@dcloudio/uni-mp-lark": "3.0.0-alpha-3061620221230002",
"@dcloudio/uni-mp-qq": "3.0.0-alpha-3061620221230002",
"@dcloudio/uni-mp-toutiao": "3.0.0-alpha-3061620221230002",
"@dcloudio/uni-mp-weixin": "3.0.0-alpha-3061620221230002",
"@dcloudio/uni-quickapp-webview": "3.0.0-alpha-3061620221230002",
"vue": "^3.2.45",
"vue-i18n": "^9.1.9"
},
"devDependencies": {
"@dcloudio/types": "^3.2.7",
"@dcloudio/uni-automator": "3.0.0-alpha-3061620221230002",
"@dcloudio/uni-cli-shared": "3.0.0-alpha-3061620221230002",
"@dcloudio/uni-stacktracey": "3.0.0-alpha-3061620221230002",
"@dcloudio/vite-plugin-uni": "3.0.0-alpha-3061620221230002",
"@vue/tsconfig": "^0.1.3",
"typescript": "^4.9.4",
"vite": "4.0.4",
"vue-tsc": "^1.0.24",
"js-yaml": "^3.14.1"
}
}
报错信息:
While resolving: @dcloudio/vite-plugin-uni@3.0.0-alpha-3061620221230002
npm ERR! Found: vite@4.0.4
npm ERR! node_modules/vite
npm ERR! peer vite@"^4.0.0" from @vitejs/plugin-legacy@3.0.2
npm ERR! node_modules/@vitejs/plugin-legacy
npm ERR! @vitejs/plugin-legacy@"^3.0.1" from @dcloudio/vite-plugin-uni@3.0.0-alpha-3061620221230002
npm ERR! node_modules/@dcloudio/vite-plugin-uni
npm ERR! dev @dcloudio/vite-plugin-uni@"3.0.0-alpha-3061620221230002" from the root project
npm ERR! peer vite@"^4.0.0" from @vitejs/plugin-vue@4.0.0
npm ERR! node_modules/@vitejs/plugin-vue
npm ERR! @vitejs/plugin-vue@"^4.0.0" from @dcloudio/uni-app-vite@3.0.0-alpha-3061620221230002
npm ERR! node_modules/@dcloudio/uni-app-vite
npm ERR! @dcloudio/uni-app-vite@"3.0.0-alpha-3061620221230002" from @dcloudio/uni-app-plus@3.0.0-alpha-3061620221230002
npm ERR! node_modules/@dcloudio/uni-app-plus
npm ERR! @dcloudio/uni-app-plus@"3.0.0-alpha-3061620221230002" from the root project
npm ERR! @vitejs/plugin-vue@"^4.0.0" from @dcloudio/vite-plugin-uni@3.0.0-alpha-3061620221230002
npm ERR! node_modules/@dcloudio/vite-plugin-uni
npm ERR! dev @dcloudio/vite-plugin-uni@"3.0.0-alpha-3061620221230002" from the root project
npm ERR! 2 more (@vitejs/plugin-vue-jsx, the root project)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vite@"4.0.3" from @dcloudio/vite-plugin-uni@3.0.0-alpha-3061620221230002
npm ERR! node_modules/@dcloudio/vite-plugin-uni
npm ERR! dev @dcloudio/vite-plugin-uni@"3.0.0-alpha-3061620221230002" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: vite@4.0.3
npm ERR! node_modules/vite
npm ERR! peer vite@"4.0.3" from @dcloudio/vite-plugin-uni@3.0.0-alpha-3061620221230002
npm ERR! node_modules/@dcloudio/vite-plugin-uni
npm ERR! dev @dcloudio/vite-plugin-uni@"3.0.0-alpha-3061620221230002" from the root project
聪大帅
也是一样的,vite版本有冲突,有的是要vite3.X有的是vite4.x。 执行npx degit dcloudio/uni-preset-vue#vite-ts my-vue3-project拉下来的一样
2023-03-10 11:58