(node:4982) UnhandledPromiseRejectionWarning: Error: unrecognised content at end of stream
at module.exports.SyncReader.process (/home/hiwyn/playimg/node_modules/pngjs/lib/sync-reader.js:43:11)
at module.exports (/home/hiwyn/playimg/node_modules/pngjs/lib/parser-sync.js:68:10)
at Object.exports.read (/home/hiwyn/playimg/node_modules/pngjs/lib/png-sync.js:7:10)
at CompareTwoImages1 (file:///home/hiwyn/playimg/test.js:6:25)
at file:///home/hiwyn/playimg/test.js:13:1
at ModuleJob.run (internal/modules/esm/module_job.js:145:37)
at async Loader.import (internal/modules/esm/loader.js:182:24)
at async Object.loadESM (internal/process/esm_loader.js:68:5)
(node:4982) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:4982) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Trying to test the lib, but got some error
Test script:
Error: