perminder-klair/resume-parser

Seems simply broken

nethermead opened this issue · 4 comments

Had issues using the npm version which breaks at parseIt.parseResume undefined.

I changed dependency to pull directly from github but now it breaks at utils/libs/processing.js:120, this.mime = mime.lookup(file)

mime.lookup is not a function.

I'm trying to parse a longish docx resume as a test but giving up and moving on.

Send a pull request to solve this problem
#8

just change the function name in processing.js and try. It works for me

lookup() renamed to getType()
extension() renamed to getExtension()

After following the changes which @sachidhanandhan suggested. I changed the code in index.js file.
Change parseit.parseResume => parseit.parseResumeFile
as there is no function in utils/parseit named ResumeFile. That is what the error is saying that there is no such function parseit.parseResume

I was able to get things working with the npm code after manually doing the changes listed here:

src/index.js:

  • module.exports.parseResume => module.exports.parseResumeFile
    *parseIt.parseResume => parseIt.parseResumeFile

src/utils/libs/processing.js:

  • mime.lookup => mime.getType
  • mime.extension => mime.getExtension

Also, it's important that you grab the pdftotext binary from here and place it in your $PATH.

@perminder-klair can you publish the latest changes in the repo to npm?