-bash: npm: command not found

    卸载node 重装

sudo yum remove nodejs

sudo yum install -y nodejs # 默认安装最新的8.x

Optional: install build tools

To compile and install native addons from npm you may also need to install build tools:

yum install gcc-c++ make # 若已经安装执行下面的命令
# or: yum groupinstall 'Development Tools'

[root@ae98dbd2a90f usr]# npm --version  # verify是否成功 接下来就可以用npm开启安装
6.13.4

 

你可能感兴趣的:(OS,npm,node)