Fix node 14+ startup error ERR_INVALID_ARG_TYPE

This commit is contained in:
joeuhren
2020-11-27 22:27:47 -07:00
parent 85fef18cdb
commit f82fbc4567
+1 -1
View File
@@ -2,7 +2,7 @@ var cluster = require('cluster');
var fs = require('fs'); var fs = require('fs');
if (cluster.isMaster) { if (cluster.isMaster) {
fs.writeFile('./tmp/cluster.pid', process.pid, function (err) { fs.writeFile('./tmp/cluster.pid', process.pid.toString(), function (err) {
if (err) { if (err) {
console.log('Error: unable to create cluster.pid'); console.log('Error: unable to create cluster.pid');
process.exit(1); process.exit(1);