To use a node library (uuid) as a command line tool from an other software I'm working on, I installed the library globally by npm i --global uuid
and tested the installation by node -e 'console.log(require("uuid")())'
, but I get an error Error: Cannot find module 'uuid'
, the global installation apparently not working properly. If I save the library locally, on the directory run the same command, it does work, so the problem is apparently the global installation. What's wrong with this?
$ nvm --version
0.35.3
$ npm -v
6.13.7
$ node -v
v13.10.1