fnogatz / xsd2json

Translate XML Schema into equivalent JSON Schema
MIT License
149 stars 28 forks source link

Error: spawn swipl ENOENT #118

Open moltar opened 4 years ago

moltar commented 4 years ago

Getting the following error:

❯ xsd2json2 Inventory.xsd
events.js:174
      throw er; // Unhandled 'error' event
      ^

Error: spawn swipl ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:240:19)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
Emitted 'error' event at:
    at Process.ChildProcess._handle.onexit (internal/child_process.js:246:12)
    at onErrorNT (internal/child_process.js:415:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Reproduce

wget https://images-na.ssl-images-amazon.com/images/G/01/rainier/help/xsd/release_4_1/Inventory.xsd
wget https://images-na.ssl-images-amazon.com/images/G/01/rainier/help/xsd/release_4_1/amzn-base.xsd
xsd2json2 Inventory.xsd

Any ideas?

Thanks.

moltar commented 4 years ago

Btw, SWI-Prolog is installed via brew:

❯ brew install swi-prolog

❯ swipl --version
SWI-Prolog version 8.0.3 for x86_64-darwin
fnogatz commented 4 years ago

Just to be sure: you are using this module, and not the fork by MGDIS? Because your command xsd2json2 (instead of xsd2json) looks like different :)