Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

possibly bad PM2_ROOT_PATH on windows #868

Closed
norbertbarbosa opened this issue Dec 4, 2014 · 3 comments
Closed

possibly bad PM2_ROOT_PATH on windows #868

norbertbarbosa opened this issue Dec 4, 2014 · 3 comments

Comments

@norbertbarbosa
Copy link

Problem:
I have a C: partition with my user account, and a E: partition with my workdir. When starting pm2 on E:\myWorkdir I always have an error message 'cannot create E:\users\myLogin.pm2

Solution:
on windows, the $HOME directory is done by the combination of %HOMEDRIVE%+%HOMEPATH%, so on $INSTALL_DIR/constants.js, change line 15, to be:
var PM2_ROOT_PATH = '';

if (process.env.PM2_HOME)
PM2_ROOT_PATH = process.env.PM2_HOME;
else
PM2_ROOT_PATH = p.resolve(process.env.HOME || (process.env.HOMEDRIVE + process.env.HOMEPATH), '.pm2');

@Tjatse
Copy link
Collaborator

Tjatse commented Dec 5, 2014

To be honest, Win32 system is still in beta phase, and have problems.
It's hard to adapt to all machines, how about you change the PM2_HOME env-var manually, i.e.:

%HOMEDRIVE%\%HOMEPATH%\.pm2

@windwaterbo
Copy link

I have the same problem. It's useful solution for the problem. thanks @Tjatse

@Tjatse
Copy link
Collaborator

Tjatse commented Dec 8, 2014

You're welcome!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants