1. pm2 home 디렉토리 확인
c:User/UserName/AppData/Roaming/npm/node_modules/pm2/paths.js
PM2_ROOT_PATH = p.resolve(process.env.HOMEDRIVE, process.env.HOME || process.env.HOMEPATH, '.pm2');
pm2-web . config.json . 수정
// To monitor multiple hosts, add extra entries to this array
"pm2": [{
"host": "localhost",
"rpc": "~/.pm2/rpc.sock",
"events": "~/.pm2/pub.sock"
// To debug remote processes, run node-inspector on the remote host and add the port
// it's listnening on here:
//, inspector: 8080
}],
"rpc": "//./pipe/rpc.sock",
"events": "//./pipe/pub.sock",
변경.
Windows
getpwuid()
is a POSIX function and won't work on Windows.
Use optionalDependencies if you need to include it in a cross-platform environment.
윈도우 미지원. os = require("os"); 사용
components 에 configuration.js 수정
// var userDetails = pwuid();
console.log("###################");
// console.log(userDetails);
var newdir = os.homedir();
console.log(os.homedir());
console.log("###################");
// ensure data is correct for each host
args.forEach(function(host) {
host.host = host.host || "localhost";
host.rpc = host.rpc || "~/.pm2/rpc.sock";
host.events = host.events || "~/.pm2/pub.sock";
if(host.rpc.substring(0, 1) == "~") {
// host.rpc = userDetails.dir + host.rpc.substring(1)
host.rpc = newdir + host.rpc.substring(1)
}
if(host.events.substring(0, 1) == "~") {
// host.events = userDetails.dir + host.events.substring(1)
host.events = newdir + host.events.substring(1)
'IT&DEV - IT & 개발 > Common' 카테고리의 다른 글
Podman 주요 명령어 모음 (0) | 2025.01.23 |
---|---|
Spring Boot Application Failed to Start: Failed to configure a DataSource (0) | 2025.01.23 |
폐쇄망 환경에서 Docker 이미지 사용하기 (0) | 2025.01.20 |
[Mac] java설치하기 open jdk 17 (0) | 2023.04.27 |
기존 프로젝트 git 연결하기 (0) | 2021.06.11 |
댓글