hotel
hotel copied to clipboard
fix invalid args type on node v14
Hi all,
This PR fixes a breaking change with node v14 where number is no longer a valid entry for fs.writeFileSync
.
In reason of that, on node v14, we will receive the error below when the daemon attempts to register the process.pid.
TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (32716)
The quick fix is to change the file hotel/lib/pid-file.js
to parse the process.pid to string.
I am happy to receive any feedback on this PR. I tested the changes on node v13, and it works just fine, so I am not expecting that machine running old versions of node will be impacted.
😁
Any chance of getting this merged?
cc @typicode can you merge and release this quick change so Hotel works on the latest Node?
@typicode please, release new version :)
this appears to still be an issue in node16 and this fix is still good. Please merge
merged this fix and published to https://www.npmjs.com/package/@qshan/hotel if you want merge/publish access lmk