h5p / h5p-cli

Command Line Interface
MIT License
64 stars 31 forks source link

h5p setup h5p-course-presentation FAILS #121

Open rezeau opened 1 week ago

rezeau commented 1 week ago

This is a fresh install of h5p-cli on a Windows 11 platform, with node.js, npm installed. It used to work with previous version of h5p-cli.

All goes well with Steps 0 and 1: _mkdir my_first_h5p_environment cd my_first_h5penvironment Install the core H5P libraries. h5p core with messages: done setting up h5p-math-display done setting up core libraries

But things go wrong with Step 2: Setup an H5P library such as h5p-course-presentation. h5p setup h5p-course-presentation

This starts setting up a few libraries, but stops on these 2 setups: 1.-installing h5p-editor-vertical-tabs 1.3.9 Cloning into 'H5PEditor.VerticalTabs-1.3'... _npm run build 'NODEENV' is not recognized as an internal or external command, an executable program, or a batch file. OK I can solve this by going into dir H5PEditor.VerticalTabs-1.3 and running npx webpack successfully

Then I run again h5p setup h5p-course-presentation... it starts ok but triggers another error:

2.- + installing shepherd 1.0.6 Cloning into 'Shepherd-1.0'... npm run build 'rm' is not recognized as an internal or external command, an executable program, or a batch file.

At that stage the following libraries have been installed and I can use them on h5p-server: h5p-audio; h5p-blanks; h5p-dialogcards; h5p-drag-question; h5p-drag-text; h5p-mark-the-words; h5p-multi-choice; h5p-multi-media-choice; h5p-questionnaire; h5p-single-choice-set; h5p-summary; h5p-true-false But I cannot find a way to setup the Shepherd library. What is strange is that it seems to use the "tether" library, but that library is NOT installed???

I don't think the issue comes only from the fact that I'm using a Windows environment, but anyway the various package.json files should be made in such a way that the libraries can be build independently of the environment used.

And again I insist that I did not have this issue with the previous version of h5p-cli (or previous versions of the H5PEditor.VerticalTabs and Shepherd libraries ?)

Note: This issue looks similar to Problems with quick start 'setup' command #119

otacke commented 1 week ago

I think it is an issue with Windows or rather the scripts assuming some commands to be available on the platform. Those scripts were changed in the respective repositories. That's why you're experiencing the issues. Has nothing to do with H5P CLI.

I agree that scripts should be platform agnostic.

No, https://github.com/h5p/h5p-cli/issues/119 was caused by the user having configured git globally to rebase when pulling.

[Edit] I just created https://h5ptechnology.atlassian.net/browse/HFP-4158

rezeau commented 1 week ago

@otacke Thanks for your speedy and detailed reply. In the end I somehow managed to get all the H5P core contents installed as well as my own contents..😊But I will look at the various workarounds you suggest for my Windows environment.

devland commented 2 days ago

It sounds like you tried to run the h5p commands in the regular windows cli environment. That is not advised. Some of the h5p-cli commands are Linux & MacOS specific. On Windows it’s recommended that you run them inside git bash.

rezeau commented 1 day ago

@devland Thanks for the tip. I have now set up bash for Windows to run the h5p-cli commands and all is working as expected. May I suggest that the h5p-cli make it very clear for Windows users? Thanks.