node-tesseract-ocr
node-tesseract-ocr copied to clipboard
Error
(node:1382) UnhandledPromiseRejectionWarning: Error: Command failed: tesseract stdin stdout /bin/sh: 1: tesseract: not found
at ChildProcess.exithandler (child_process.js:308:12)
at ChildProcess.emit (events.js:314:20)
at ChildProcess.EventEmitter.emit (domain.js:483:12)
at maybeClose (internal/child_process.js:1022:16)
at Socket.<anonymous> (internal/child_process.js:444:11)
at Socket.emit (events.js:314:20)
at Socket.EventEmitter.emit (domain.js:483:12)
at Pipe.<anonymous> (net.js:675:12)
(node:1382) 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:1382) [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.
events.js:291
throw er; // Unhandled 'error' event
^
Error [ERR_STREAM_DESTROYED]: Cannot call write after a stream was destroyed at doWrite (_stream_writable.js:399:19) at writeOrBuffer (_stream_writable.js:387:5) at Socket.Writable.write (_stream_writable.js:318:11) at IncomingMessage.ondata (_stream_readable.js:718:22) at IncomingMessage.emit (events.js:314:20) at IncomingMessage.EventEmitter.emit (domain.js:483:12) at IncomingMessage.Readable.read (_stream_readable.js:507:10) at flow (stream_readable.js:1007:34) at resume (_stream_readable.js:988:3) at processTicksAndRejections (internal/process/task_queues.js:84:21) Emitted 'error' event on Socket instance at: at errorOrDestroy (internal/streams/destroy.js:108:12) at Socket.onerror (_stream_readable.js:754:7) at Socket.emit (events.js:314:20) at Socket.EventEmitter.emit (domain.js:483:12) at errorOrDestroy (internal/streams/destroy.js:108:12) at onwriteError (_stream_writable.js:418:5) at onwrite (_stream_writable.js:445:5) at doWrite (_stream_writable.js:399:11) at writeOrBuffer (_stream_writable.js:387:5) at Socket.Writable.write (_stream_writable.js:318:11) { code: 'ERR_STREAM_DESTROYED' }
Same error here
its caused by tesseract not being installed on your machine
Open a terminal and type in "tesseract", get this to work first. This is basically what this node module relies upon.