Skip to content

cli error: TypeError: Object #<Master> has no method 'pidof' #145

Closed
alefnula opened this Issue Aug 18, 2011 · 1 comment

2 participants

@alefnula

This happens always when I try any cli command. I suspect this is because of the next thing:

pidfiles.js

40 return function(master){
41    dir = master.pidfiles = master.resolve(dir || 'pids');
42    mkdir(dir, 0755, function(err){
43      if (err) throw err;
44
45      // augment master
46      master.pidof = function(name){

I think this is because of the next scenario: When the function mkdir is executed, the function returns so the next plugin (cli) is initialized. So before the mkdir callback starts executing the cli plugin is running, and the pidof function is still not set on the master.

@tj tj closed this in a1587ca Aug 18, 2011
@tj
LearnBoost member
tj commented Aug 18, 2011

thanks man

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.