tno-terminology-design / tev2-tools

The Terminology Engine (v2) is a set of specifications and tools that caters for the creation and maintenance (i.e. curation) of terminologies. This repository contains the sources for the tools.
Apache License 2.0
2 stars 3 forks source link

tools can't be globally installed even after executed pre-requisites and if only locally installed: not found / executed #39

Closed henkvancann closed 8 months ago

henkvancann commented 8 months ago

Followed https://tno-terminology-design.github.io/tev2-specifications/docs/specs/tools/mrg-import

Done prequisites for .zshrc, check:

didwebs-tev2 ➤ echo $PATH                                                                                                                                                                                  git:main
/Users/henkvancann/.npm-global/bin:/usr/local/bin:/usr/local/sbin:...

Still it won't get through:

didwebs-tev2 ➤ npm install -g @tno-terminology-design/mrg-import git:main npm ERR! code EACCES npm ERR! syscall mkdir npm ERR! path /usr/local/lib/node_modules/@tno-terminology-design npm ERR! errno -13 npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@tno-terminology-design' npm ERR! at async mkdir (node:internal/fs/promises:855:10) npm ERR! at async /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:551:20 npm ERR! at async Promise.allSettled (index 0) npm ERR! at async [reifyPackages] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:251:11) npm ERR! at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:170:5) npm ERR! at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:152:5) npm ERR! at async module.exports (/usr/local/lib/node_modules/npm/lib/cli-entry.js:61:5) npm ERR! Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/@tno-terminology-design' npm ERR! at async mkdir (node:internal/fs/promises:855:10) npm ERR! at async /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:551:20 npm ERR! at async Promise.allSettled (index 0) npm ERR! at async [reifyPackages] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:251:11) npm ERR! at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:170:5) npm ERR! at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:152:5) npm ERR! at async module.exports (/usr/local/lib/node_modules/npm/lib/cli-entry.js:61:5) { npm ERR! errno: -13, npm ERR! code: 'EACCES', npm ERR! syscall: 'mkdir', npm ERR! path: '/usr/local/lib/node_modules/@tno-terminology-design' npm ERR! } npm ERR! npm ERR! The operation was rejected by your operating system. npm ERR! It is likely you do not have the permissions to access this file as the current user npm ERR! npm ERR! If you believe this might be a permissions issue, please double-check the npm ERR! permissions of the file and its containing directories, or try running npm ERR! the command again as root/Administrator.

npm ERR! A complete log of this run can be found in: /Users/henkvancann/.npm/_logs/2024-02-26T05_59_49_710Z-debug-0.log

henkvancann commented 8 months ago

Ended up installing only locally:

npm install @tno-terminology-design/mrg-import   

which seemed to work:

added 68 packages in 9s

16 packages are looking for funding
  run `npm fund` for details

But then:

didwebs-tev2 ➤  mrg-import -V                                                                                                                                                                             git:main*
zsh: command not found: mrg-import

Checks:

didwebs-tev2 ➤ which mrg-import                                                                                                                                                                           git:main*
mrg-import not found
didwebs-tev2 ➤ which http-server                                                                                                                                                                          git:main*

/Users/henkvancann/.npm-global/bin/http-server

henkvancann commented 8 months ago
didwebs-tev2 ➤ npm install @tno-terminology-design/mrgt                                                                                                                                                   git:main*

added 11 packages, and audited 80 packages in 414ms

16 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
didwebs-tev2 ➤ mrgt -V                                                                                                                                                                                    git:main*
zsh: command not found: mrgt

Same is the case for mrgt, hrgt and trrt.

RieksJ commented 8 months ago

@henkvancann I'm sorry that I cannot help you - this is not my expertise. You might want to find others that do this and know about this (or the Internet?).

I would really appreciate it if you could document your findings and solution, either in this ticket, or as a PR on the tev2-specifications repo. Pls. also indicate the OS you're using (Windows, Linux, something else).

henkvancann commented 8 months ago

Screenshot 2024-02-27 at 09 22 42

RieksJ commented 8 months ago

Cool. It would help a lot if you could find out what was wrong, and then do a PR that adds a text to the documentation that explains how to do a good setup of npm on macOS, similar as that we have one for windows and linux.

henkvancann commented 8 months ago

Yep, we will get to the stage of being able to offer PRs, but I first need to get my hands and arms all around TEv2. As soon as it becomes transparent for us, we're able to move into next gear.

Ca5e commented 8 months ago

Few notes that may help troubleshooting.

henkvancann commented 8 months ago

We also found a work-around in : node_modules/@tno-terminology-design/trrt/lib/Run.js node_modules/@tno-terminology-design/mgrt/lib/Run.js

etc