TJkrusinski/NodePDF

Can not call method 'call'

Closed this issue · 3 comments

Hi Krusinski..
Thanks for the great module...
Though I got the pdf file generated, I kept getting the below error msg, which make me worry how the module is stable, and releable for production environment,,

Can you pls look into this, thanks

"TypeError: Cannot call method 'call' of undefined TypeError: Cannot call method
'call' of undefined
    at D:\rectoPG\node_modules\nodepdf\index.js:62:23
    at D:\rectoPG\node_modules\nodepdf\child.js:18:10
    at ChildProcess.exithandler (child_process.js:710:5)
    at ChildProcess.EventEmitter.emit (events.js:107:17)
    at maybeClose (child_process.js:825:16)
    at Socket.<anonymous> (child_process.js:1042:11)
    at Socket.EventEmitter.emit (events.js:104:17)
    at Pipe.close (net.js:458:12)
--------------------------------------------------------------------
TypeError: Cannot call method 'call' of undefined TypeError: Cannot call method
'call' of undefined
    at readStream (D:\rectoPG\node_modules\nodepdf\index.js:76:23)
    at Socket.<anonymous> (D:\rectoPG\node_modules\nodepdf\index.js:81:3)
    at Socket.EventEmitter.emit (events.js:126:20)
    at readableAddChunk (_stream_readable.js:156:16)
    at Socket.Readable.push (_stream_readable.js:123:10)
    at Pipe.onread (net.js:511:20)
--------------------------------------------------------------------

Thanks for submitting the bug, I'll take a look at it this evening.

The problem is caused because you didn't "subscribe" to the error event. Anyway, this shouldn't happen, i just opened a pull request to solve this issue.

I'm using this project on several production sites and it works quite well so far (Except for some PhantomJS bugs which can't be solved here).

Thanks!