PS D:\java\项目\uniapp\uniapp小程序-配套资料\03-code\02-uniapp项目代码> npm i -D miniprogram-api-typings @uni-helper/uni-app-types 
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: uni-app-xiaotuxian@0.0.0
npm ERR! Found: vite@4.5.1
npm ERR! node_modules/vite
npm ERR!   dev vite@"^4.0.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vite@"^3.0.0" from @vitejs/plugin-vue@3.2.0
npm ERR! node_modules/@vitejs/plugin-vue
npm ERR!   dev @vitejs/plugin-vue@"^3.0.3" 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\86090\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\86090\AppData\Local\npm-cache\_logs\2023-12-18T04_00_43_882Z-debug-0.log

改用pnpm

首先

npm i -g pnpm

然后

npm i -D miniprogram-api-typings @uni-helper/uni-app-types

完美解决

更多推荐