netwerk-digitaal-erfgoed / ld-workbench

A CLI tool for transforming large RDF datasets using pure SPARQL.
4 stars 1 forks source link

Clarify NPX versus NPM approach for installation #70

Closed wouterbeek closed 3 months ago

wouterbeek commented 3 months ago

Observation

Installing LD Workbench through NPX has never worked for me. I get the following error:

npx @netwerk-digitaal-erfgoed/ld-workbench --init
'ld-workbench' is not recognized as an internal or external command,
operable program or batch file.

Expected

Let's remove this option from the readme. It may work in some cases, but not in others. There are more traditional options that use NPM that do work consistently.

ddeboer commented 3 months ago

It was fixed and should work. Please try:

npm cache clean --force
npx @netwerk-digitaal-erfgoed/ld-workbench --init

If that doesn’t work:

npx @netwerk-digitaal-erfgoed/ld-workbench@latest --init

NPX really is the best way for users of this package. Package developers, on the other hand, can clone the source and install dependencies using NPM.

ddeboer commented 3 months ago

Additionally, let’s add #73 for a more portable solution.

Running npx @netwerk-digitaal-erfgoed/ld-workbench in my local ld-workbench checkout directory fails too. Please try in some other directory.

wouterbeek commented 3 months ago

Thanks @ddeboer, you are correct that the command only does not work in the ld-workbench directory, but does work in a different directory. I think that I have always run the command from the ld-workbench directory, and have therefore incorrectly assumed that NPX did not work (while in reality it actually does work).

If you do not see any downside to it, could you add the following line to the documentation:

Notice that the NPX command can be run from any directory, except for directories that were created by making a Git clone of this repository. Also notice that the NPM command must be run from the direcotry that was created by making a Git clone of this repository.

github-actions[bot] commented 3 months ago

:tada: This issue has been resolved in version 2.0.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: