foreversd/forever

[ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (1505)

jimmithe13th opened this issue · 3 comments

(node:1498) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use node --trace-warnings ... to show where the warning was created)
node:internal/fs/utils:879
throw new ERR_INVALID_ARG_TYPE(
^

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (1505)
at Object.writeFileSync (node:fs:2146:5)
at writePid (/usr/lib/node_modules/forever/bin/monitor:13:6)
at exports.Monitor. (/usr/lib/node_modules/forever/bin/monitor:46:5)
at exports.Monitor.EventEmitter.emit (/usr/lib/node_modules/forever/node_modules/eventemitter2/lib/eventemitter2.js:339:22)
at /usr/lib/node_modules/forever/node_modules/forever-monitor/lib/forever-monitor/monitor.js:180:10
at processTicksAndRejections (node:internal/process/task_queues:78:11) {
code: 'ERR_INVALID_ARG_TYPE'
}

Does anyone was able to fix this error? I can't run my script right now..

I got this error soon after I upgraded to Nodejs 14. No way to fix it. I had to give up with forever.

I have a same issue. I upgraded to Node.js 16.

TypeError [ERR_INVALID_ARG_TYPE]: The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received type number (1508)
at Object.writeFileSync (node:fs:2163:5)
at writePid (/usr/lib/node_modules/forever/bin/monitor:13:6)
at exports.Monitor. (/usr/lib/node_modules/forever/bin/monitor:46:5)
at exports.Monitor.EventEmitter.emit (/usr/lib/node_modules/forever/node_modules/eventemitter2/lib/eventemitter2.js:339:22)
at /usr/lib/node_modules/forever/node_modules/forever-monitor/lib/forever-monitor/monitor.js:177:10
at processTicksAndRejections (node:internal/process/task_queues:78:11) {
code: 'ERR_INVALID_ARG_TYPE'

I encountered this issue and after some experimentation I realised the project was using a very old version of forever (1.0.0) and using Nodejs 18. Once I updated forever to the latest 4.0.3 I no longer saw the issue.