hotel icon indicating copy to clipboard operation
hotel copied to clipboard

fix invalid args type on node v14

Open alanlima opened this issue 4 years ago • 5 comments

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.

😁

alanlima avatar May 06 '20 01:05 alanlima

Any chance of getting this merged?

ahallicks avatar Jun 30 '20 14:06 ahallicks

cc @typicode can you merge and release this quick change so Hotel works on the latest Node?

j-f1 avatar Jul 12 '20 15:07 j-f1

@typicode please, release new version :)

exah avatar Feb 22 '21 12:02 exah

this appears to still be an issue in node16 and this fix is still good. Please merge

raphaeleidus avatar Aug 09 '21 18:08 raphaeleidus

merged this fix and published to https://www.npmjs.com/package/@qshan/hotel if you want merge/publish access lmk

quinn avatar Dec 01 '21 23:12 quinn