npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: vite-plugin-ejs@1.7.0
npm ERR! Found: vite@4.5.0
npm ERR! node_modules/vite
npm ERR! dev vite@"4.5.0" from the root project
npm ERR! peerOptional vite@"^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0" from @unocss/astro@0.57.7
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: vite-plugin-ejs@1.7.0
npm ERR! Found: vite@4.5.0
npm ERR! node_modules/vite
npm ERR! dev vite@"4.5.0" from the root project
npm ERR! peerOptional vite@"^2.9.0 || ^3.0.0-0 || ^4.0.0 || ^5.0.0-0" from @unocss/astro@0.57.7
npm ERR! node_modules/@unocss/astro
npm ERR! @unocss/astro@"0.57.7" from unocss@0.57.7
npm ERR! node_modules/unocss
npm ERR! dev unocss@"^0.57.4" from the root project
npm ERR! 11 more (@unocss/vite, @vitejs/plugin-legacy, ...)
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vite@">=5.0.0" from vite-plugin-ejs@1.7.0
npm ERR! node_modules/vite-plugin-ejs
npm ERR! dev vite-plugin-ejs@"^1.6.4" from the root project
npm ERR!
npm ERR! Conflicting peer dependency: vite@5.4.7
npm ERR! node_modules/vite
npm ERR! peer vite@">=5.0.0" from vite-plugin-ejs@1.7.0
npm ERR! node_modules/vite-plugin-ejs
npm ERR! dev vite-plugin-ejs@"^1.6.4" 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!
npm ERR! For a full report see:
npm ERR! D:\nodejs\node_cache\_logs\2024-09-22T05_44_56_692Z-eresolve-report.txt
npm ERR! A complete log of this run can be found in: D:\nodejs\node_cache\_logs\2024-09-22T05_44_56_692Z-debug-0.log
解决办法
npm install --legacy-peer-deps