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

"Please run npm first" as CLI output #110

Open
pierreprime opened this issue Jul 6, 2019 · 3 comments
Open

"Please run npm first" as CLI output #110

pierreprime opened this issue Jul 6, 2019 · 3 comments
Assignees

Comments

@pierreprime
Copy link

pierreprime commented Jul 6, 2019

Hi there, and thanks for xsd2json's dev. I'm having a problem using this tool that I installed globally via npm, with straight-forward method or by cloning this repo.

When running :
xsd2json output/xsd/no_options_spec.xsd > output/json-sc/no_options_exp.json
I'm having the following output in resulting json file :

Please run
 npm install
first

I don't understand why I'd have to run npm install again. I have swipl v.7.6.4 on my system, and checked that its functionalities were reachable typing what you specified here : #53

I had to use sudo to get xsd2json installed globally, if ever this is important. I don't know if it's a good practice when using npm, I'm more of a PHP dev and with composer it is not. Searching the error message in the repo, I found it in cli.exe. But since I'm on linux I thought .exe file were not supposed to run.

One more thing : xsd2json --debug-info gives the same error msg about npm install.
Thanks for your help and have a good weekend :)

@fnogatz
Copy link
Owner

fnogatz commented Jul 10, 2019

Hi, thank you for reporting this! In fact, the output is returned as it is the default contents of /lib-pl/cli.exe (as can be seen here). It gets replaced after pre-compilation of the Prolog files. This process is normally initiated as part of npm install xsd2json, as it is defined as a preinstall script for npm in the package.json file. You can manually start the pre-compilation by just calling npm run preinstall. I just updated xsd2json's README.md accordingly (commit cfe3813).

tl;dr: Chances are that you can just call npm run preinstall in xsd2json's root directory and give it another try :)

@fnogatz fnogatz self-assigned this Jul 10, 2019
@pierreprime
Copy link
Author

Thanks a lot for your return. I'll give it a try tomorrow

@fnogatz
Copy link
Owner

fnogatz commented Oct 28, 2019

Hi @pierreprime, did you have a chance to review your issue?

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

No branches or pull requests

2 participants