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

console.debug not in NodeJS #40

Closed
pjobson opened this issue Oct 16, 2016 · 0 comments
Closed

console.debug not in NodeJS #40

pjobson opened this issue Oct 16, 2016 · 0 comments

Comments

@pjobson
Copy link

pjobson commented Oct 16, 2016

node v6.8.1 supports:

Console {
  log: [Function: bound ],
  info: [Function: bound ],
  warn: [Function: bound ],
  error: [Function: bound ],
  dir: [Function: bound ],
  time: [Function: bound ],
  timeEnd: [Function: bound ],
  trace: [Function: bound trace],
  assert: [Function: bound ],
  Console: [Function: Console] }

Tesseract fails on line 123 when it attempts to call the debug method.

var Tesseract = require('tesseract.js');
var myImage = './screenshot_05.png';
Tesseract.detect(myImage)
    .progress(function(message){
        console.log('progress is: ', message)
    });
 ~/code/tesseract_test $ node index.js
progress is:  { status: 'loading tesseract core' }
progress is:  { status: 'loaded tesseract core' }
progress is:  { status: 'initializing tesseract', progress: 0 }
pre-main prep time: 67 ms
progress is:  { status: 'initializing tesseract', progress: 1 }
progress is:  { status: 'loading osd.traineddata', progress: 1 }
Number of blobs post-filtering = 91
Number of blobs to try = 91
/Volumes/HOME/Users/pj/code/tesseract_test/node_modules/tesseract.js/src/index.js:123
            if(this._resolve.length === 0) console.debug(data);
                                                   ^

TypeError: console.debug is not a function
    at TesseractJob._handle (/Volumes/HOME/Users/pj/code/tesseract_test/node_modules/tesseract.js/src/index.js:123:43)
    at TesseractWorker._recv (/Volumes/HOME/Users/pj/code/tesseract_test/node_modules/tesseract.js/src/index.js:71:21)
    at ChildProcess.<anonymous> (/Volumes/HOME/Users/pj/code/tesseract_test/node_modules/tesseract.js/src/node/index.js:14:18)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at process.nextTick (internal/child_process.js:744:12)
    at _combinedTickCallback (internal/process/next_tick.js:67:7)
    at process._tickCallback (internal/process/next_tick.js:98:9)
antimatter15 added a commit that referenced this issue Oct 16, 2016
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

1 participant