1.报错
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘electron–packager@17.1.1’,
npm WARN EBADENGINE required: { node: ‘>= 14.17.5’ },
npm WARN EBADENGINE current: { node: ‘v12.22.9’, npm: ‘8.5.1’ }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘mdui@1.0.2’,
npm WARN EBADENGINE required: { node: ‘>=14’ },
npm WARN EBADENGINE current: { node: ‘v12.22.9’, npm: ‘8.5.1’ }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: ‘mdui.jq@2.0.1’,
npm WARN EBADENGINE required: { node: ‘>=14’ },
npm WARN EBADENGINE current: { node: ‘v12.22.9’, npm: ‘8.5.1’ }
npm WARN EBADENGINE }
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated @npmcli/move–file@2.0.1: This functionality has been moved to @npmcli/fs
npm WARN deprecated electron–rebuild@3.2.9: Please use @electron/rebuild moving forward. There is no API change, just a package name change
2.解决思路: 编译好的bin安装
1.分别查看node和npm版本,她俩要匹配上,才不会报错冲突
2.看官网npm和node版本是怎么匹配的?如果不匹配按照下载就行
3.分别安装npm9.6.3版本和node19.9.0版本
4.下载node与npm安装包(注意:node和npm在一个安装包,已经对应好了node与npm的版本)
<1>.下载稳定版本地址:https://nodejs.org/en/download
<2>.下载最新版本地址: https://nodejs.org/download/release/v19.9.0/
<3>.安装19.9.0已编译好的bin包
1.解压测试
# cd node-v19.9.0-linux-x64
# ./bin/node -v
v19.9.0
# ./bin/npm -v
9.6.3
2.设置软链接
# cp -rf node-v19.9.0-linux-x64 /opt
# ln -s /opt/nodejs/bin/npm /usr/bin/
# ln -s /opt/nodejs/bin/node /usr/bin/
# node -v
v19.9.0
# npm -v
9.6.3
2.解决思路: 源码安装(编译比较耗时)
//1.速度慢
# git clone https://github.com/nodejs/node.git
Or
//2.速度快,推荐!
# wget https://nodejs.org/dist/v19.9.0/node-v19.9.0-linux-x64.tar.xz
# sudo ./configure
$ sudo make
$ sudo make install
# node -v
# npm -v
原文地址:https://blog.csdn.net/u010164190/article/details/130081003
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.7code.cn/show_38454.html
如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除!