首页 > 编程语言 >03_nodejd_npm install报错

03_nodejd_npm install报错

时间:2023-10-01 14:03:18浏览次数:33  
标签:npm 03 vue ERR -- nodejd legacy 报错 peer



npm install报错


npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/vue
npm ERR!   vue@"2.5.17" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer vue@"^2.6.0" from @chenfengyuan/[email protected]
npm ERR! node_modules/@chenfengyuan/vue-qrcode
npm ERR!   @chenfengyuan/vue-qrcode@"^1.0.2" 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:

4.报错原因

在新版本的npm中,默认情况下,npm install遇到冲突的peerDependencies时将失败。

5.解决办法

使用–force或–legacy-peer-deps可解决这种情况。

--force 会无视冲突,并强制获取远端npm库资源,当有资源冲突时覆盖掉原先的版本。

    --legacy-peer-deps标志是在v7中引入的,目的是绕过peerDependency自动安装;它告诉         NPM 忽略项目中引入的各个modules之间的相同modules但不同版本的问题并继续安装,保            证各个引入的依赖之间对自身所使用的不同版本modules共存。

建议用–legacy-peer-deps 比较保险一点

在终端输入

npm install --legacy-peer-deps


标签:npm,03,vue,ERR,--,nodejd,legacy,报错,peer
From: https://blog.51cto.com/u_15935817/7673859

相关文章

  • Can't delete myfile.mexw64 after run mexw64?
    Ifoundmyanswer,this".mexw64"cannotbedeletedafterusingclear,butcanbedeletedafterusingclearallfromhttps://www.mathworks.com/matlabcentral/answers/1563471-can-t-delete-myfile-mexw64-after-run-mexw64......
  • DOSBox0.74使用Debug时p命令报错
    环境操作系统:Windows10DOSBox0.74DEBUG.EXE从WindowsXP或其他复制到的DOSBox下问题在学习到王爽的《汇编语言》时,第4章,第5章用到了debug中的p命令。但是,在自己的环境下,debug程序的p命令直接报错!可能的原因首先,p命令报错,应该是debug程序的问题。除了这个问......
  • 03_nodjs_npm的使用
    03【npm的使用】1.包和npm1.1什么是包由于Node是一套轻内核的平台,虽然提供了一系列的内置模块,但是不足以满足开发者的需求,于是乎出现了包(package)的概念:与核心模块类似,就是将一些预先设计好的功能或者说API封装到一个文件夹,提供给开发者使用。Node本身并没有太多的功能性AP......
  • TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' [duplicate]
      str|Nonesyntaxisonlysupportedin3.10orlater.UsefromtypingimportOptionalname:Optional[str]=NoneForcaseswheretherighthandsideisn'tNoneortherearemorethantwotypes,youcanuseUnionfromtypingimportUnionfoo:U......
  • AttributeError: module 'numpy' has no attribute 'int'.
    AttributeError:module'numpy'hasnoattribute'int'.numpy                    1.24.1                  pypi_0   pypiscikit-learn             1.2.2                   pypi_0   p......
  • SpringBoot框架大晚上报错404--我的路径问题(附上SpringBoot MVC管理系统的简单具体代
    代码application.ymlspring:web:resources:static-locations:classpath:/static/,classpath:/templates/datasource:type:com.alibaba.druid.pool.DruidDataSourceurl:jdbc:mysql://localhost/test?useUnicode=true&characterEncoding=utf......
  • The name org.freedesktop.secrets was not provided by any .service files 报错问
    在搭建cicddocker靶场的时候出现这个问题,由于是第一次遇到,就想记录下来 通过各种搜索资料搜索发现只要安装如下包就没问题 1apt-yinstallgnome-keyring 这样做之后,一切都可以这样就可以了 ......
  • P1037 [NOIP2002 普及组] 产生数
    P1037[NOIP2002普及组]产生数解法1:利用floyd寻找每位数字可变化的点点击查看代码#include<bits/stdc++.h>usingnamespacestd;constintN=1e5+10;strings;intd[20][20];intf[25];intnum[150];intmain(){ cin>>s; intn=s.length(); intq; ci......
  • redis 连接报错read error on connection解决
    在使用redis队列处理的时候,有时候队列过长会遇到超时的情况。原因分析:查看了下php.ini文件里面有个参数default_socket_timeout=60,就是这个配置导致redis过60秒会自动断开。这个配置是什么意思?default_socket_timeout是socket流的超时参数,即socket流从建立到传输再到关闭整个过......
  • 切比雪夫单调不等式(Chebyshev's monotonic inequality)(一般分配律)
    前置知识:一般分配律:\(\displaystyle\sum_{\substack{j\inJ\\k\inK}}a_jb_k\)\(=\displaystyle\sum_{\substack{j\inJ}}\displaystyle\sum_{\substack{k\inK}}a_jb_k\)\(=(\displaystyle\sum_{\substack{j\inJ}}a_j)(\displaystyle\sum_{\substac......