首页 前端知识 解决npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher

解决npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher

2024-06-05 13:06:52 前端知识 前端哥 215 618 我要收藏

一、问题

环境

系统:centos 7
node :v18.16.1
npm:9.5.1

安装pm2

npm install -g pm2

提示报错:

npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.

changed 184 packages in 17s

12 packages are looking for funding
  run `npm fund` for details

二、解决

更新uuid

npm install uuid@latest -g

更新成功后,继续安装pm2,也会提示:npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher.

其实是已经安装成功了

1、查找pm2的安装位置

find / -name pm2

/usr/local/lib/node_modules/pm2
/usr/local/lib/node_modules/pm2/lib/templates/logrotate.d/pm2
/usr/local/lib/node_modules/pm2/bin/pm2
/usr/local/lib/node_modules/pm2/pm2

2、增加pm2软链接

ln -s /usr/local/lib/node_modules/pm2/bin/pm2 /usr/local/bin

查看pm2版本

pm2 -v
即可

在这里插入图片描述

转载请注明出处或者链接地址:https://www.qianduange.cn//article/10892.html
标签
评论
发布的文章

基于Vue2的ofd文件预览

2024-06-10 11:06:28

网页快速置灰效果

2024-06-10 11:06:17

HTML5 CSS——Day6

2024-06-10 11:06:11

HTML5 CSS3面试题整理

2024-05-05 22:05:21

大家推荐的文章
会员中心 联系我 留言建议 回顶部
复制成功!