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

Mammoth not returning anything [Windows 7, 32-bit node] #29

Closed
deepsyx opened this issue Nov 24, 2014 · 7 comments
Closed

Mammoth not returning anything [Windows 7, 32-bit node] #29

deepsyx opened this issue Nov 24, 2014 · 7 comments

Comments

@deepsyx
Copy link

deepsyx commented Nov 24, 2014

Hello. I tried installing mammoth, but I didn't succeeded. I tried typing

var mammoth = require("mammoth");

mammoth.convertToHtml({path: "E:\\Smartly.docx"})
.then(function(result){
    var html = result.value; // The generated HTML
    var messages = result.messages; // Any messages, such as warnings during conversion
    console.log(html, message);
})
.fail(function(){
    console.log('asdsad');
})
.done(function(){
    console.log('please');
}); 

in a test.js file, but when I run it, it instantly closes and no error or message are returned. I'm sure file exists and it's a valid docx.

OS: NodeJs 32bit on Windows 7

Any ideas, why I cannot run it @mwilliamson?

Thanks.

@mwilliamson
Copy link
Owner

Hmm, it is strange that you're not even getting any errors. What happens if:

  • you try to convert that file through the CLI?
  • you try converting it using the browser demo?
  • you try to convert a file that just contains a single paragraph of text?

@deepsyx
Copy link
Author

deepsyx commented Nov 25, 2014

@mwilliamson, 1) When I run it through the CLI I get the following:

E:\mammoth>mammoth Shelves.docx output.html
E:\mammoth>

No file is created, no error response.

  1. Since I'm windows user and don't have make, I tried http://mike.zwobble.org/projects/mammoth/ and it works

  2. It's the same as 1), no response.

I just installed mammoth@0.3.11 on my Debian machine and completely reinstalled it on my windows one.
It works fine on Debian, but the windows version is still broken.

@mwilliamson
Copy link
Owner

Hmm. Could you try running the tests? In case it's not clear how to do so:

  • Clone the repository
  • Run npm install
  • Run npm test

@deepsyx
Copy link
Author

deepsyx commented Nov 26, 2014

@mwilliamson here is the CMD copy of the result from both commands:

http://pastebin.com/3S4WUsbt

and here is the screen:

http://i.imgur.com/Gjh995s.png

I ran mocha tests and received the following:

http://i.imgur.com/PPHnF7f.png

Only these tests fails

@mwilliamson
Copy link
Owner

Thanks for running the tests. Strange that the actual failures seem to be missing from the output. I'll try it out myself on a Windows machine when I get a chance, although that might not be until the weekend. My extremely elaborate plan is just to stick in a load of debugging print statements until I discover where in the execution the program seems to stop.

@mwilliamson
Copy link
Owner

A few thoughts:

  • If you just run mammoth without any arguments, do you get any errors?
  • How did you install Mammoth originally? It seems as if the code is working but the executable itself is not. Have you tried invoking the mammoth script using node explicitly?
  • In the cloned repository, what happens if you try invoking mammoth using node explicitly e.g. node E:\mammoth.js\bin\mammoth path/to/document.docx? (Changing paths as appropriate)

@mwilliamson mwilliamson changed the title Mammoth not returning anything Mammoth not returning anything [Windows 7, 32-bit node] Jan 18, 2015
@mwilliamson
Copy link
Owner

I couldn't reproduce when I tried this myself on Windows 7 using 32-bit node, so closing. Feel free to reopen if this is still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants