简体   繁体   中英

PM2 home directory on Windows

I have a logs folder in C:\\Users\\username.pm2\\logs, but whenever I try to start pm2 I am getting this error in my Logs:

PM2: 2015-11-20 13:23:32: Starting execution sequence in -fork mode- for app name:app id:0
PM2: 2015-11-20 13:23:32: Trace: [Error: can not create directories (logs/pids):ENOENT: no such file or directory, mkdir 'D:\Users\username\.pm2\logs']

So I think this is a config issue. How can I change the PM2 home directory to C:\\Users\\username\\.pm2 instead of D:\\Users\\username\\.pm2 ?

Apperantly this is an open issue on their github page, so I came up with two possible solutions:

you can make those folders on your other drive: D:\\Users\\username\\.pm2

or just reisntall pm2:

npm uninstall -g pm2
npm install -g pm2

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM