kripken / xml.js

Port of libxml to JavaScript using Emscripten
Other
174 stars 67 forks source link

Nodejs exits with error code 1 #18

Closed apazureck closed 7 years ago

apazureck commented 7 years ago

Hi,

I have an Issue using xml.js with node js. I am not sure what happens here. I am trying to integrate the xml-linter in vscode and each time my callback to my language server runs through, node.js exits with error code 1. This seems to be caused by the validateXML method:

let result = xmllint.validateXML({
    xml: [xmlfile.xml],
    schema: [schemafile.xsd]
    });

Here are the steps to reproduce the problem: (step 0: install vscode (insider)) https://github.com/Microsoft/vscode/issues/17024

What may cause nodejs to quit? I did not find any process.exit() in your js files, therefore, I think it may cause some memory problem in node?

sterpe commented 7 years ago

This has come up a couple od times. Think it's something to do with changes to node that are now incompatible with the version of emscripten this library was built with. There are many limitations of the javascript port, so for node applications I am recommending folks shell out to real xmllint binary.

apazureck commented 7 years ago

Ok, thank you for that Information. I will try to put it in another process for now and hope it does not crash the whole node server.

Beat-YT commented 2 years ago

I know it's an old topic, but I have a fork that is focusing on nodejs support https://github.com/Beat-YT/xml.js