首页 > 其他分享 >npm:升级自身时报错:EBADENGINE

npm:升级自身时报错:EBADENGINE

时间:2023-09-07 13:22:18浏览次数:44  
标签:npm node EBADENGINE 时报 ERR root https com

一,报错信息

root@lhdpc:~# npm install -g npm
npm ERR! code EBADENGINE
npm ERR! engine Unsupported engine
npm ERR! engine Not compatible with your version of node/npm: [email protected]
npm ERR! notsup Not compatible with your version of node/npm: [email protected]
npm ERR! notsup Required: {"node":"^18.17.0 || >=20.5.0"}
npm ERR! notsup Actual:   {"npm":"9.5.1","node":"v16.13.1"}
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2023-09-06T05_18_41_835Z-debug-0.log

二,解决:

Required: {"node":"^18.17.0 || >=20.5.0”}

需要node的版本号为^18.17.0以上,

当前版本:

Actual:   {"npm":"9.5.1","node":"v16.13.1”}

需要先升级node

升级node:重新安装环境即可:

参考这个:

https://blog.imgtouch.com/index.php/2023/09/06/ubuntu-linux-an-zhuang-node-v18-17-1/

说明:刘宏缔的架构森林—专注it技术的博客,
网站:https://blog.imgtouch.com
原文: https://blog.imgtouch.com/index.php/2023/09/06/npm-sheng-ji-zi-shen-shi-bao-cuo-ebadengine/
代码: https://github.com/liuhongdi/ 或 https://gitee.com/liuhongdi
说明:作者:刘宏缔 邮箱: [email protected]

三,测试效果:

重新安装后,npm升级:

查看当前版本

root@lhdpc:/usr/local/source/node# npm -v
9.6.7

升级

root@lhdpc:/usr/local/source/node# npm install -g npm
removed 12 packages, and changed 76 packages in 4s
28 packages are looking for funding
  run `npm fund` for details

查看升级后的版本

root@lhdpc:/usr/local/source/node# npm -v
10.0.0

已没有问题

标签:npm,node,EBADENGINE,时报,ERR,root,https,com
From: https://www.cnblogs.com/architectforest/p/17684571.html

相关文章

  • npm,nrm管理源仓库地址
    npm修改源地址,使用nrm管理源仓库地址npm源地址查看与修改#查看当前源地址npmgetregistry#设为淘宝镜像npmsetregistryhttps://registry.npm.taobao.org/使用nrm便捷管理源#全局安装npminrm-g#查看版本,注意是大写Vnrm-V#查看nrm预设配置源地址nrmls......
  • npm install总是到最后不动
    踩坑日记npminstall总是到最后不动,最后发现是npm淘宝镜像源地址更新了,所以我们同步一下即可;解决问题方法,npm淘宝镜像源换最新的//切换新的镜像源npmconfigsetregistryhttps://registry.npmmirror.com......
  • npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree
       npx-pnpm@6npmi参考:https://blog.csdn.net/weixin_40461281/article/details/115543024......
  • PNPM 与 Monorepo
    为什么选择PNPM?在JavaScript的世界里,npm和yarn可能是最为人所熟知的包管理器。然而,这并不意味着他们就是最优的选择。相反,PNPM是一个值得你关注的强大工具。它解决了npm和yarn的一些痛点,例如项目间的依赖项重复和大量占用硬盘空间的问题。因此,如果你是一个对性能有严格要求,或者是......
  • npm教程:发布包到nexus私服
    使用nrm管理npm源nrmaddrofohttp://localhost:8081/repository/rofo-npm-group/nrmuserofo或者npmconfigsetregistryhttp://localhost:8081/repository/rofo-npm-group/npm登录npmlogin-registry=http://localhost:8081/repository/rofo-npm-hosted/npm发布包到私......
  • OGG_Linux_x64_BigData启动ggsci时报错:error while loading shared libraries: libjvm
    问题描述:[root@hadoop03ggs]$./ggsci./ggsci:errorwhileloadingsharedlibraries:libjvm.so:cannotopensharedobjectfile:Nosuchfileordirectory 解决办法:1.查看缺少那些.so文件[root@hadoop03/]# lddggsci 2.查libjvm.so库文件的路径[root@hadoop0......
  • How to install a npm package from the GitHub repository All In One
    HowtoinstallanpmpackagefromtheGitHubrepositoryAllInOnegitrepo$git+https://github.com/xgqfrms/wcui.git$git+ssh://[email protected]/xgqfrms/wcui.git$npminstallhttps://github.com/xgqfrms/wcui/tree/[email protected]:x......
  • 执行npm install 命令时报错Error: EPERM: operation not permitted, uv_cwd
    执行npminstall命令时报错path.js:1077path=process.cwd();^Error:EPERM:operationnotpermitted,uv_cwdatObject.resolve(path.js:1077:24)检查一下当前所在的文件夹是否已被删除了。......
  • Doris启动FE时报错:JAVA_HOME tset
    Doris启动FE时报错:JAVA_HOMEtset问题描述运行代码启动fe时报错./start_fe.sh--daemon错误信息Error:JAVA_HOMEisnotset.问题截图问题分析可能服务器环境里安装了多个jdk解决方案在start_fe.sh中输入以下代码,指定jdk即可exportJAVA_HOME=/data/soft/jdk1.8......
  • vue npm install报错
    PSI:\Vue3+ts+e-plus后台管理\vue3-ts-element-plus-master\vue3-ts-element-plus-master>npminstallnpmERR!codeERESOLVEnpmERR!ERESOLVEcouldnotresolvenpmERR! npmERR!Whileresolving:[email protected]!Found:[email protected]!node_......