modesty / pdf2json

converts binary PDF to JSON and text, for server-side PDF processing and command-line use.
https://github.com/modesty/pdf2json
Other
1.98k stars 378 forks source link

pdf2json is referring to xmldom by './../node_modules/xmldom' #5

Closed SamDecrock closed 11 years ago

SamDecrock commented 11 years ago

You should never refer to a module using a path:

On line 6 of pdf.js: DOMParser = require('./../node_modules/xmldom').DOMParser

Should be DOMParser = require('xmldom').DOMParser

'Cause now I'm getting the following error when using pdf2json:

Error: Cannot find module './../node_modules/xmldom'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Module.require (module.js:362:17)
    at require (module.js:378:17)
    at Object.<anonymous> (/Some/great/path/node_modules/pdf2json/pdf.js:6:17)
    at Module._compile (module.js:449:26)
    at Object.Module._extensions..js (module.js:467:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:362:17)
caseyamcl commented 11 years ago

+1

modesty commented 11 years ago

thanks for pointing it out, fixed in v0.1.14.