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

Fix directory creation when installed as a local module #905

Closed
Tug opened this issue Dec 26, 2014 · 2 comments
Closed

Fix directory creation when installed as a local module #905

Tug opened this issue Dec 26, 2014 · 2 comments

Comments

@Tug
Copy link

Tug commented Dec 26, 2014

When running:

var pm2 = require('pm2');
pm2.connect(function(err) {});

after installing pm2 locally, this is what I get:

[PM2] Spawning PM2 daemon

fs.js:432
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^
Error: ENOENT, no such file or directory '/Users/polo/.pm2/pm2.log'
    at Object.fs.openSync (fs.js:432:18)
    at Object.launchDaemon (/Users/polo/Work/nirror/nirror-server/node_modules/pm2/lib/Satan.js:314:14)
    at /Users/polo/Work/nirror/nirror-server/node_modules/pm2/lib/Satan.js:52:20
    at /Users/polo/Work/nirror/nirror-server/node_modules/pm2/lib/Satan.js:372:14
    at process._tickCallback (node.js:419:13)

I guess a quick fix would be to copy paste the code from CLI.pm2Init in Satan.launchDaemon.

@Tjatse
Copy link
Collaborator

Tjatse commented Dec 26, 2014

see #858, any help?

@Tug
Copy link
Author

Tug commented Dec 26, 2014

@Tjatse yep, it did the trick, thank you!

@Tug Tug closed this as completed Dec 26, 2014
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

2 participants