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

Revision control metadata errors #1009

Closed
pschuegr opened this issue Feb 12, 2015 · 9 comments
Closed

Revision control metadata errors #1009

pschuegr opened this issue Feb 12, 2015 · 9 comments

Comments

@pschuegr
Copy link

This seems to work on first run, but using pm2 info eventually errors on the revision control info.

Revision control metadata

/Users/pschuegr/ss/server/node_modules/pm2/node_modules/cli-table/lib/index.js:182
      var contents = item.toString().split("\n").reduce(function (memo, l) {
                          ^
TypeError: Cannot call method 'toString' of undefined

pm2 version 0.12.5
node version 0.10.35

@pschuegr
Copy link
Author

Sorry, here's the rest of the callstack;

TypeError: Cannot call method 'toString' of undefined
    at /Users/pschuegr/weltel/server/node_modules/pm2/node_modules/cli-table/lib/index.js:182:27
    at Array.forEach (native)
    at generateRow (/Users/pschuegr/weltel/server/node_modules/pm2/node_modules/cli-table/lib/index.js:181:11)
    at /Users/pschuegr/weltel/server/node_modules/pm2/node_modules/cli-table/lib/index.js:275:16
    at Table.forEach (native)
    at Table.toString (/Users/pschuegr/weltel/server/node_modules/pm2/node_modules/cli-table/lib/index.js:258:10)
    at Object.UX.describeTable (/Users/pschuegr/weltel/server/node_modules/pm2/lib/CliUx.js:96:24)
    at /Users/pschuegr/weltel/server/node_modules/pm2/lib/CLI.js:1146:12
    at Array.forEach (native)
    at /Users/pschuegr/weltel/server/node_modules/pm2/lib/CLI.js:1145:18

Looks like it might be a cli-table issue?
Automattic/cli-table#30

@pschuegr
Copy link
Author

It's because the repo_path eventually comes back as undefined, which explodes cli-table. Don't have time to dig further atm.

https://github.com/Unitech/PM2/blob/master/lib/God.js#L437

soyuka pushed a commit to soyuka/pm2 that referenced this issue Feb 13, 2015
@jshkurti
Copy link
Contributor

Fixed, thanks for the feedback :)
1627209

@raine
Copy link
Contributor

raine commented Feb 20, 2015

I have the change from 1627209 but still get the error:

Revision control metadata
/usr/local/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:182
      var contents = item.toString().split("\n").reduce(function (memo, l) {
                         ^
TypeError: Cannot read property 'toString' of undefined
    at /usr/local/lib/node_modules/pm2/node_modules/cli-table/lib/index.js:182:26

@jshkurti
Copy link
Contributor

Try pm2 update

@raine
Copy link
Contributor

raine commented Feb 20, 2015

Thanks. That fixed it. I guess there was actually an old version of pm2 running in the background.

@starsirius
Copy link

@jshkurti I am still getting the same error after all the steps above. If I go back and use 0.9.6, it works fine. Any advice? Thanks.

pm2 0.12.8
node v0.12.0
os Ubuntu 14.04

@jshkurti
Copy link
Contributor

pm2 kill; pkill -f PM2; pkill -9 PM2; npm i -g pm2@latest
If it happens again, show me some ~/.pm2/pm2.logs please :)

@starsirius
Copy link

yeah still no luck. :(

Here is the ~/.pm2/pm2.logs

2015-03-22 20:43:18: [PM2][WORKER] Started with refreshing interval: 30000
2015-03-22 20:43:18: [[[[ PM2/God daemon launched ]]]]
2015-03-22 20:43:18: BUS system [READY] on port /home/takoman/.pm2/pub.sock
2015-03-22 20:43:18: RPC interface [READY] on port /home/takoman/.pm2/rpc.sock
2015-03-22 20:43:18: Starting execution sequence in -fork mode- for app name:index id:0
2015-03-22 20:43:18: App name:index id:0 online
2015-03-22 20:43:18: Error: spawn coffee ENOENT
    at exports._errnoException (util.js:746:11)
    at Process.ChildProcess._handle.onexit (child_process.js:1046:32)
    at child_process.js:1137:20
    at process._tickDomainCallback (node.js:381:11)

Thanks a lot.

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

4 participants