question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix the docs so that returned doc is actually a promise

See original GitHub issue

hi,im using this package for a test,and i got this problem

`F:\parseWord\app.js:4 var body = doc.getBody(); ^

TypeError: doc.getBody is not a function at Object.<anonymous> (F:\parseWord\app.js:4:16) at Module._compile (module.js:409:26) at Object.Module._extensions…js (module.js:416:10) at Module.load (module.js:343:32) at Function.Module._load (module.js:300:12) at Function.Module.runMain (module.js:441:10) at startup (node.js:139:18) at node.js:968:3`

code:

`var WordExtractor = require(“word-extractor”); var extractor = new WordExtractor(); var doc = extractor.extract(“./testDocccccc.doc”) var body = doc.getBody();

console.log(body)`

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
morungoscommented, Aug 16, 2016

Do you have a test/public version of this .doc file you could share with me, then I can take a look? You send directly to stuart@morungos.com if you prefer.

0reactions
morungoscommented, Aug 17, 2016

Good for finding this. If you can make enough of a test case that I can get it, I’d be happy to look into this. It’s very possible, given that the encodings used inside both Word and JavaScript are neither especially standard, and there could well be issues that have fallen in between.

I’d be happy to fix if you can find a small enough test file that I can understand, although it might be best flagging that as a new issue, and I’ll use this to fix the docs

Read more comments on GitHub >

github_iconTop Results From Across the Web

Promise - JavaScript - MDN Web Docs
The Promise object represents the eventual completion (or failure) of an asynchronous operation and its resulting value.
Read more >
How to specify resolution and rejection type of the promise in ...
I was wondering about something similar. How do I document the return type of a function that can return multiple different things based...
Read more >
We have a problem with promises - PouchDB
The problem is that the first function is actually returning undefined , meaning that the second function isn't waiting for db.remove() to be ......
Read more >
'request' with Promise - GitHub
GitHub - request/request-promise: The simplified HTTP request client 'request' ... { return resolveWithFullResponse ? response : body; } you may now set the ......
Read more >
Realtime Database triggers | Cloud Functions for Firebase
You must return a Promise when performing asynchronous tasks inside a Functions such as // writing to the Firebase Realtime Database.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found