centos安装pm2报错
报错信息:
/usr/lib/node_modules/pm2/node_modules/chalk/source/index.js:103 ...styles,

这个问题其实很简单,就是npm和node的版本太低,但是我查了一下,我的npm版本是3.10,node版本是6.17

只需升级npm版本即可:
1. 卸载npm
npm uninstall npm -g
2. 安装gcc
yum install gcc gcc-c++
3. 自建一个文件夹下载node
mkdir npm
cd npm
wget https://npm.taobao.org/mirrors/node/v10.14.1/node-v10.14.1-linux-x64.tar.gz
4. 解压
tar -xvf node-v10.14.1-linux-x64.tar.gz
mv node-v10.14.1-linux-x64 node
5. 添加环境变量
vi /etc/profile
在其中添加
export NODE_HOME=/root/npm/node
export PATH=$NODE_HOME/bin:$PATH
注意!! NODE_HOME后面的值要添加到自己的node解压的路径
6. 刷新配置
source /etc/profile
7. 看看自己的版本情况
node -v
npm -v

8. 安装pm2
npm install -g pm2<br><br>pm2 list
9. 完成

centos安装pm2报错的更多相关文章
- Centos 安装docker报错
错误信息: 安装报错:Transaction check error: file /usr/lib/systemd/system/blk-availability.service from inst ...
- CentOS安装Nginx 报错“configure: error: the HTTP rewrite module requires the PCRE library”解决办法
错误提示: ./configure: error: the HTTP rewrite module requires the PCRE library. yum install gcc gc ...
- CentOS安装openvpn报错:error: route utility is required but missing
centos7特有,直接安装net-tools即可. 参考: https://forums.openvpn.net/viewtopic.php?t=21432
- centos安装rvm报错@curl -L get.rvm.io | bash -s stable fails on cent OS
It is a security feature introduced in the latest version of RVMhttps://github.com/wayneeseguin/rvm/ ...
- CentOS安装Redis报错[server.o] Error 1
原因 准备安装的Redis服务版本为6.0.8, gcc的版本为4.8.5,可能是gcc版本过低到导致的 解决办法 安装低版本Redis或者安装高版本gcc
- 安装docker报错:https://download.docker.com/linux/centos/7/i386/stable/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
如题,执行docker安装命令报错: [root@centos ~]# yum install docker-ce Loaded plugins: fastestmirror, security Se ...
- Centos下yum安装Nginx报错 No package nginx available.
在Centos6下使用yum安装Nginx报错 解决方案: yum install epel-release
- 通过本地yum源安装软件报错[Errno 14] PYCURL ERROR 56 - "Failure when receiving data from the peer"
通过本地yum源安装软件报错 http://192.168.3.85/centos/6/os/x86_64/Packages/php-pdo-5.3.3-47.el6.x86_64.rpm: [Err ...
- centOS下yum报错
CentOS下yum报错 备注:当我们在CentOS下使用yum命令的时候,会报一些错误,一下是我总结的几个解决问题的方法.(保证自己的服务器可以上网) 一.关于Loaded plugins: fas ...
随机推荐
- IDL使用
出错的问题,可能是因为路径,或者没有建立工程文件. 运行IDL并在preferences项里修改设置(如图中红框所示) (IDL 8.4中在) 2, 中文字符显示乱码,改为gb2312
- 微信小程序自动化测试
使用官方工具 使用webview测试方法,当2019年被微信封禁 使用native定位
- no rxtxSerial in java.library.path
java开发过程中,遇到no rxtxSerial in java.library.path问题,是由于缺少一个dll文件导致. 在jre/bin下添加rxtxSerial.dll 文件 win10环 ...
- 配置Nginx和php-fpm用Sock套接字连接时,找不到php-fpm.sock的原因
php5.3之后的版本,php-fpm.conf里的listen的默认配置是127.0.0.1:9000,就不会生成php-fpm.sock,因此如果需要Nginx里的配置有链接tmp/php-fpm ...
- hadoop生态之CDH搭建系列
本次搭建使用的版本是CloudManager 1.15.1
- python3.7+flask+alipay 支付宝付款功能
文档参考github:https://github.com/fzlee/alipay/blob/master/docs/init.md 沙箱环境配置:https://opendocs.alipay.c ...
- P4091-[HEOI2016/TJOI2016]求和【斯特林数,NTT】
正题 题目链接:https://www.luogu.com.cn/problem/P4091 题目大意 给出\(n\),求 \[\sum_{i=0}^n\sum_{j=0}^i\begin{Bmatr ...
- SpringBoot之SpringSecurity权限注解在方法上进行权限认证多种方式
前言 Spring Security支持方法级别的权限控制.在此机制上,我们可以在任意层的任意方法上加入权限注解,加入注解的方法将自动被Spring Security保护起来,仅仅允许特定的用户访问, ...
- AOJ/搜索与递归及分治法习题集
ALDS1_4_A-LinearSearch. Description: You are given a sequence of n integers S and a sequence of diff ...
- 鲲鹏展翅|SphereEx 获华为鲲鹏技术认证
SphereEx Data Middleware 通过了华为鲲鹏技术认证并加入鲲鹏展翅伙伴计划,未来 SphereEx Data Middleware 产品将继续以分布式能力为基础,以数据安全.分布式 ...