Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jimmithe13th opened this issue Dec 11, 2021 · 3 comments

Comments

@jimmithe13th
Copy link

(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..

@fmarzocca
Copy link

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

@mg2000
Copy link

mg2000 commented May 3, 2022

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'

@lukestoward
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants