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

TypeError: Buffer.alloc is not a function #3827

Closed
FrancoisPala opened this issue Jul 24, 2018 · 7 comments
Closed

TypeError: Buffer.alloc is not a function #3827

FrancoisPala opened this issue Jul 24, 2018 · 7 comments

Comments

@FrancoisPala
Copy link

What's going wrong?

When starting my Docker container that is using pm2, I get this error:

pm2 launched in no-daemon mode (you can add DEBUG="*" env variable to get more messages)
[2018-07-24T20:34:53.113Z] PM2 log: Launching in no daemon mode
[2018-07-24T20:34:53.221Z] PM2 log: [PM2] Starting /src/server/server.js in cluster_mode (1 instance)
[2018-07-24T20:34:53.225Z] PM2 log: Starting execution sequence in -cluster mode- for app name:server id:0
[2018-07-24T20:34:53.286Z] PM2 log: App name:server id:0 online
[2018-07-24T20:34:53.289Z] PM2 log: [PM2] Done.
/usr/lib/node_modules/pm2/node_modules/pidusage/lib/procfile.js:27
    buf = Buffer.alloc(SIZE)
                 ^

TypeError: Buffer.alloc is not a function
    at readUntilEnd (/usr/lib/node_modules/pm2/node_modules/pidusage/lib/procfile.js:27:18)
    at /usr/lib/node_modules/pm2/node_modules/pidusage/lib/procfile.js:68:5
    at FSReqWrap.oncomplete (fs.js:145:20)
pm2 launched in no-daemon mode (you can add DEBUG="*" env variable to get more messages)
[2018-07-24T20:35:01.420Z] PM2 log: Launching in no daemon mode
[2018-07-24T20:35:01.476Z] PM2 log: [PM2] Starting /src/server/server.js in cluster_mode (1 instance)
[2018-07-24T20:35:01.479Z] PM2 log: Starting execution sequence in -cluster mode- for app name:server id:0
[2018-07-24T20:35:01.539Z] PM2 log: App name:server id:0 online
[2018-07-24T20:35:01.541Z] PM2 log: [PM2] Done.
/usr/lib/node_modules/pm2/node_modules/pidusage/lib/procfile.js:27
    buf = Buffer.alloc(SIZE)
                 ^

TypeError: Buffer.alloc is not a function
    at readUntilEnd (/usr/lib/node_modules/pm2/node_modules/pidusage/lib/procfile.js:27:18)
    at /usr/lib/node_modules/pm2/node_modules/pidusage/lib/procfile.js:68:5
    at FSReqWrap.oncomplete (fs.js:145:20)

How could we reproduce this issue?

Start a Docker container that uses pm2

Supporting information

I'm using the latest node version to date (10.7.0), same for pm2 (3.0.1)

@morfie78
Copy link

I am having the same issue. 😟

@JamesHagerman
Copy link

#3825

@mauricionr
Copy link

starting my application with pm2-runtime i have no issues with pm2@3.0.1

http://pm2.keymetrics.io/docs/usage/docker-pm2-nodejs/

@vmarchaud
Copy link
Contributor

We published pm2 version 3.0.2 that pin the version of pidusage and should fix the issue, can everyone confirm that it's good now ?

@FrancoisPala
Copy link
Author

Switched back to 2.10.4 for now, will try the newer version soon. Thanks! :)

@flaviocordova
Copy link

Me too... :(

@Unitech
Copy link
Owner

Unitech commented Jul 25, 2018

all good now, closing

@Unitech Unitech closed this as completed Jul 25, 2018
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

7 participants