Could not resolve dependency: peer vite@“^2.5.10“ from @vitejs/plugin-vue@2.1.0

这篇具有很好参考价值的文章主要介绍了Could not resolve dependency: peer vite@“^2.5.10“ from @vitejs/plugin-vue@2.1.0。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

Could not resolve dependency: npm ERR! peer vite@“^2.5.10” from @vitejs/plugin-vue@2.1.0

github中fork后:npm i安装项目依赖时报错:

PS E:\download\vue-color-avatar-main> npm i
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: vue-color-avatar@1.0.0
npm ERR! Found: vite@3.0.3
npm ERR! node_modules/vite
npm ERR!   dev vite@"^3.0.3" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vite@"^2.5.10" from @vitejs/plugin-vue@2.1.0
npm ERR!   dev @vitejs/plugin-vue@"^2.1.0" 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\zhao\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\zhao\AppData\Local\npm-cache\_logs\2023-03-07T23_12_08_149Z-debug-0.log

报错中有提供解决方案:

npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps

使用:npm install --forcenpm install --legacy-peer-deps

问题:
在使用npm install --legacy-peer-deps时,依旧报错:

PS E:\download\vue-color-avatar-main> npm install --legacy-peer-deps
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated @types/vfile-message@2.0.0: This is a stub types definition. vfile-message provides its own type definitions, so you do not need this installed.
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated @volar/html2pug@0.31.2: WARNING: This project has been renamed to @johnsoncodehk/html2pug. Install using @johnsoncodehk/html2pug instead.
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated trim@0.0.1: Use String.prototype.trim() instead
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated vscode-pug-languageservice@0.31.2: WARNING: This project has been renamed to @volar/pug-language-service. Install using @volar/pug-language-service instead.
npm WARN deprecated vscode-typescript-languageservice@0.31.2: WARNING: This project has been renamed to @volar/typescript-language-service. Install using @volar/typescript-language-service instead.
npm WARN deprecated vscode-vue-languageservice@0.31.2: WARNING: This project has been renamed to @volar/vue-language-service. Install using @volar/vue-language-service instead.
npm ERR! Cannot read properties of null (reading 'pickAlgorithm')

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\zhao\AppData\Local\npm-cache\_logs\2023-03-07T23_16_16_126Z-debug-0.log

使用:npm install --force,安装依赖包成功文章来源地址https://www.toymoban.com/news/detail-627308.html

PS E:\download\vue-color-avatar-main> npm i --force
npm WARN using --force Recommended protections disabled.
npm WARN ERESOLVE overriding peer dependency
npm WARN While resolving: @vitejs/plugin-vue@2.1.0
npm WARN Found: vite@3.0.3
npm WARN node_modules/vite
npm WARN   dev vite@"^3.0.3" from the root project
npm WARN
npm WARN Could not resolve dependency:
npm WARN peer vite@"^2.5.10" from @vitejs/plugin-vue@2.1.0
npm WARN node_modules/@vitejs/plugin-vue
npm WARN   dev @vitejs/plugin-vue@"^2.1.0" from the root project
npm WARN 
npm WARN Conflicting peer dependency: vite@2.9.15
npm WARN node_modules/vite
npm WARN   peer vite@"^2.5.10" from @vitejs/plugin-vue@2.1.0
npm WARN   node_modules/@vitejs/plugin-vue
npm WARN     dev @vitejs/plugin-vue@"^2.1.0" from the root project
npm WARN deprecated @types/vfile-message@2.0.0: This is a stub types definition. vfile-message provides its own type definitions, so you do not need this installed.
npm WARN deprecated @volar/html2pug@0.31.2: WARNING: This project has been renamed to @johnsoncodehk/html2pug. Install using @johnsoncodehk/html2pug instead.
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated trim@0.0.1: Use String.prototype.trim() instead
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
npm WARN deprecated vscode-pug-languageservice@0.31.2: WARNING: This project has been renamed to @volar/pug-language-service. Install using @volar/pug-language-service instead.
npm WARN deprecated vscode-typescript-languageservice@0.31.2: WARNING: This project has been renamed to @volar/typescript-language-service. Install using @volar/typescript-language-service instead.
npm WARN deprecated vscode-vue-languageservice@0.31.2: WARNING: This project has been renamed to @volar/vue-language-service

到了这里,关于Could not resolve dependency: peer vite@“^2.5.10“ from @vitejs/plugin-vue@2.1.0的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • Could not resolve dependencies for project

    maven 打包Could not resolve dependencies for project和无效的目标发行版: 1.8 1.maven 打包Could not resolve dependencies for project 最近项目上使用的是idea ide的多模块话,需要模块之间的依赖,比如说系统管理模块依赖授权模块进行认证和授权,而认证授权模块需要依赖系统管理模块进行,然后

    2024年02月08日
    浏览(61)
  • 解决npm install时报错Could not resolve dependency

    最近在新的项目使用npm install时发现报错: npm WARN cli npm v9.6.4 does not support Node.js v15.14.0. This version of npm supports the following node versions: `^14.17.0 || ^16.13.0 || =18.0.0`. You can find the latest version at https://nodejs.org/. npm ERR! code ERESOLVE npm ERR! ERESOLVE could not resolve npm ERR!  npm ERR! While resolving:

    2024年02月08日
    浏览(50)
  • Maven编译报错:Could not resolve dependencies for project

    编译项目时 出现报错: Failed to execute goal on project xxx-mybatis: Could not resolve dependencies for project com.xxx:xxx-mybatis:jar:0.0.1-SNAPSHOT: Could not transfer artifact org.mybatis:mybatis:jar:3.4.5 from/to central ( https://repo.maven.apache.org/maven2): GET request of: org/mybatis/mybatis/3.4.5/mybatis-3.4.5.jar from central failed: Pr

    2024年02月03日
    浏览(58)
  • npm ERR! code ERESOLVEnpm ERR! ERESOLVE could not resolve dependency

    使用命令安装 npm 包时,我收到这些异常。 如何解决 ERESOLVE 无法解决安装 npm 包时的依赖关系树错误 错误? 要解决 ERESOLVE 安装 npm 包时无法解决依赖关系树错误,您有 依赖关系冲突 ( 不正确 且可能 损坏 的依赖关系),如它所说,因此请尝试使用 或 运行命令。如果它没有

    2024年02月08日
    浏览(112)
  • IDEA项目启动报错:Failed to execute goal on project xxx: Could not resolve dependencies for project

    [ERROR] Failed to execute goal on project xxx: Could not resolve dependencies for project Failed to collect dependencies at xxx .xxx-service:jar:dev: Failed to read artifact descriptor for xxxx/maven-snapshots/ during a previous attempt. This failure was cached in the local repository and resolution is not reattempted until the update interval of nexus-snaps

    2024年02月03日
    浏览(108)
  • ubuntu18.04+win10双系统,ubuntu黑屏进不去,显示“ACPI BIOS Error(bug):Could not resolve symbol ....“的参考解决方案

    电脑是华硕天选1 显卡为Nvidia 2060 ubuntu18.04+win10双系统 参考了一下NVIDIA显卡的Ubuntu驱动程序安装方法的P4,最终成功解决,问题的根源请教了一下杰哥,是Ubuntu对BIOS的ACPI特性支持不好。 解决方案是禁用nouveau驱动和ACPI(不知道为什么ACPI出问题,光禁用nouveau也能解决),按照

    2024年04月13日
    浏览(49)
  • Error: @vitejs/plugin-vue requires vue (>=3.2.13) or @vue/compiler-sfc to be present in the dependen

    1.没有下载安装axios运行依赖 2.或者缺少这个库没有安装 npm i @vue/compiler-sfc 3.node版本冲不冲突

    2024年02月11日
    浏览(35)
  • Could not resolve placeholder “xxx“ in value “${}“ springboot启动报错:IllegalArgumentException: Could not resolve placeholder ‘‘ in value “${}“

    在网上看了很多方法,都没有用。 首先我确定我的yml配置文件里面配置没有错: 然后地址引用的地方也加了@Value,类上也加了@Service注解,引用的格式也没有错   其次,我也试过了maven install,package,再三检查了target文件里面有配置文件, 发现都没有错 但是就是报错,经过

    2024年02月11日
    浏览(49)
  • 报错ssh: Could not resolve hostname

    …按照网上好多教程试了一下: 新建密钥,添加到gitee,重新测试。 修改host,加入gitee的ip地址到里面去。 修改.gifconfig配置文件,配置成ssh的仓库链接。 这上面的方法都不行,后面发现一篇文章:SSH连服务器时,连接不上,出现以下错误的原因与解决办法。 才知道是因为一

    2024年02月06日
    浏览(49)
  • npm ERR! ERESOLVE could not resolve

    问题产生的原因和如何解决,其实npm已经列在了最后: 问题原因是依赖冲突导致不能下载依赖包(dependency conflict), 因为npm版本升级(version7), npmV7之前的版本遇到依赖冲突会忽视依赖冲突,继续进行安装, npmV7版本开始不会自动进行忽略,需要用户手动输入命令。 解决

    2024年02月15日
    浏览(49)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包