The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Promise
- Dominant language
- TypeScript
- Stars
- 14.7k
- Forks
- 777
- PR merge metrics
- No merged PRs in 30d
Description
# Expected Behavior
I need it will not kill the program because of an error I dont know why is happening
# Current Behavior
I get sometimes error, I dont know when, but it not on my code.
events.js:292
throw er; // Unhandled 'error' event
^
TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Promise
at WriteStream.Writable.write (internal/streams/writable.js:285:13)
at WriteStream. (/home/XXX/domains/XXX.com/public_html/server/node_modules/@jimp/core/dist/index.js:589:18)
at WriteStream.emit (events.js:315:20)
at internal/fs/streams.js:380:12
at FSReqCallback.oncomplete (fs.js:171:23)
Emitted 'error' event on process instance at:
at emitUnhandledRejectionOrErr (internal/event_target.js:545:11)
at MessagePort.[nodejs.internal.kHybridDispatch] (internal/event_target.js:358:9)
at MessagePort.exports.emitMessage (internal/per_context/messageport.js:18:26) {
code: 'ERR_INVALID_ARG_TYPE'
}
# Failure Information (for bugs)
An error, it happening 1 - 2 times in a day I dont know why, but I using your library to resize and compress images.
## Steps to Reproduce
**Screenshots**
## Context
- Jimp Version: 0.13.0
- Operating System: Centos 7 64bit
- Node version: 14.15.4
## Failure Logs
Thank you!
Contributor guide
Assessment
This issue has not been assessed yet.