Fix node 14+ startup error ERR_INVALID_ARG_TYPE
This commit is contained in:
+1
-1
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user