Error when Installing

I’m exactly using the command npm install -g @enigmampc/discovery-cli to install it.
Here’s some of the output:

> npm WARN tar ENOENT: no such file or directory, open '/root/.nvm/versions/node/v11.15.0/lib/node_modules/.staging/lodash-47f770d0/lang.js'
> npm WARN tar ENOENT: no such file or directory, open '/root/.nvm/versions/node/v11.15.0/lib/node_modules/.staging/lodash-47f770d0/fp/last.js'
> npm WARN tar ENOENT: no such file or directory, open '/root/.nvm/versions/node/v11.15.0/lib/node_modules/.staging/lodash-47f770d0/last.js'
> npm WARN tar ENOENT: no such file or directory, open '/root/.nvm/versions/node/v11.15.0/lib/node_modules/.staging/lodash-47f770d0/fp/lastIndexOf.js'
> npm WARN tar ENOENT: no such file or directory, open '/root/.nvm/versions/node/v11.15.0/lib/node_modules/.staging/lodash-47f770d0/lastIndexOf.js'
> npm WARN tar ENOENT: no such file or directory, open '/root/.nvm/versions/node/v11.15.0/lib/node_modules/.staging/lodash-47f770d0/fp/lastIndexOfFrom.js'
> npm WARN tar ENOENT: no such file or directory, open '/root/.nvm/versions/node/v11.15.0/lib/node_modules/.staging/lodash-47f770d0/lodash.js'
> npm WARN @truffle/decoder@3.0.15 requires a peer of truffle@^5.0.14 but none is installed. You must install peer dependencies yourself.
> npm WARN acorn-jsx@5.1.0 requires a peer of acorn@^6.0.0 || ^7.0.0 but none is installed. You must install peer dependencies yourself.
> 
> npm ERR! Error while executing:
> npm ERR! /usr/bin/git ls-remote -h -t https://github.com/ethereumjs/ethereumjs-abi.git
> npm ERR! 
> npm ERR! fatal: cannot come back to cwd: Permission denied
> npm ERR! 
> npm ERR! exited with error code: 128
> 
> npm ERR! A complete log of this run can be found in:
> npm ERR!     /root/.npm/_logs/2019-11-07T13_03_06_844Z-debug.log

Actually there are tens of rows indicating the “no such file or directory” error. Even adding the parameters --unsafe-perm or --allow-root doesn’t work.
I’m using node v11.15 with nvm and npm v6.13.0 on Ubuntu 18.04. And i also have tried node v8 LTS and v10 LTS.

1 Like

Hi. It seems your user doesn’t have permission to install packages globally.

This thread has more info.

Quick answer is to use nvm, though there are other options. Hope that helps, let us know how it goes.

ps-- welcome back @ycfung ! We would love to hear what you’re thinking of building.