theme: vuepress
昨天晚上更新了时间戳转换工具,但是在部署时出现了问题,输入pm2提示没有命令,但是当时网站还在正常运行。
情况就是这样,pm2提示未找到命令,node也是,未找到命令。我甚至把pm2管理器卸载重装了都不行,就在我准备要手动安装node时,发现一个文件夹:home下面有个www,里面有环境变量,我source了一下就可以用了。
[root@localhost ~]# ls /home/www -a
. .. .bash_logout .bash_profile .bashrc
[root@localhost ~]# source /home/www/.bash_profile
[root@localhost ~]# source /home/www/.bashrc
[root@localhost ~]# pm2
usage: pm2 [options] <command>
pm2 -h, --help all available commands and options
pm2 examples display pm2 usage examples
pm2 <command> -h help on a specific command
Access pm2 files in ~/.pm2
这样就可以解决了。