Closed henkvancann closed 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
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.
@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).
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.
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.
Few notes that may help troubleshooting.
-g
or --global
flag indicates the package is supposed to get installed in /usr/local/lib/node_modules/
instead of the module within the current working directory. Which makes a corresponding package available as a sort of global tool.npx
(within the directory where the package is installed).
didwebs-tev2 ➤ npx mrg-import
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
Followed https://tno-terminology-design.github.io/tev2-specifications/docs/specs/tools/mrg-import
Done prequisites for .zshrc, check:
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