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.
Thank you, I’ve been using nvm to manage node. I only have root user on my server, so I don’t think it’s something related to permissions. btw, can I know what Linux distribution are u guys using to deploy the discovery-CPI?
Hi @ycfung I’m having the same issue that you’re having when I installed discovery-cli 0.1.4. Prior to that I was using 0.1.3 and didn’t have a problem.
I’m not using nvm though - I was going to try that next since it’s recommended but since you’re still having the issue I’ll hold off.
Hi @laura and @victor I have a clean installation using Ubuntu 18.04 and node v11.5 with nvm. So far I have successfully deployed the millionaire problem secret contract. I just tried a few times and do some snapshot step by step on a virtual machine, then, it worked. And I will go on testing it.
Does this work on a Mac at all? Wanted to do something with this at ETH Waterloo, but couldn’t install it.
I’m using Mac Mohave 10.14.6. Node v13.1.0. Just doing regular “npm i @enigmampc/discovery-cli” (after npm init, local node_modules), and just getting tons of dependency errors. There are no binaries for my system (e.g., fsevents), so it tries building from source, and then that fails because of version incompatibilities.
Sample errors:
npm run rebuild || echo “Keccak bindings compilation fail. Pure JS implementation will be used.”
Followed by C++ compile errors like:
…/src/addon.cc:75:82: error: too few arguments to function call, single argument ‘context’ was not specified
KeccakWrapper* to = Nan::ObjectWrap::Unwrap(info[0]->ToObject());
I’ve tried lots of things, like manually installing all the things that error out, but everything has dependency issues.
Is there some configuration that will make this work on Mac Mohave, or do I need to abandon this and try to use VMs? I really prefer to run things locally if possible.
Hi there, yes I use Mac OS, exactly your version too.
Its likely your node version isn’t yet supported, I use nvm to toggle versions and I’m currently running discovery-cli on 10.17.0 and 11.15.0, I’ve used some others too.
Thanks, taariq! I was coming to that conclusion too – somehow missed that line in the docs!
It would have been quite a stretch at Waterloo - it was peripheral to the idea (options DEX), but I was looking for a way to securely/privately call into exchange APIs. Would like to explore that more when I’m not under pressure. Let me downgrade Node and get a little farther first. Thanks again!
Thanks for checking in, @ainsley! I got a bit farther, at least before holidays and travel intervened. Using nvm, I installed 11.15 (nvm install 11.15; nvm use 11.15). Then I deleted node_modules and package-lock.json, did “npm init” again to start fresh, and tried “npm i @enigmapc/discovery-cli” again. This did appear to work - no errors (plenty of warnings), and it looks like it’s there.
It wouldn’t let me install it globally, though, so it’s just local. So now I’m not sure how to run “discovery init” when it’s installed locally. “discovery” isn’t in the path now, and I’m not sure what it is. I’m probably close.
Permission errors unless I use sudo (which I don’t really want to do because I could mess up other projects). When I use sudo, then I run into the issue of node versions again (global node is v13, vs the v11 I need for this). Shouldn’t it also work locally? Or can I somehow call it using a path? What is discovery anyway, a C++ executable? Can I just use the binary somehow?