Getting error while zcash setup in ubuntu server - bitcore

I have tried to installed zcash insight ui & api in my local machine (ubuntu OS) and it is completed all the steps but I m facing issue while start services in frontground.
Let me share with you command, config file.
<code>
npm install -g zcash-bitcore-node
zcash-bitcore-node create mynode
cd mynode
zcash-bitcore-node install insight-api
zcash-bitcore-node install insight-ui
zcash-bitcore-node start</code>
But getting below error in my terminal:
<code>
[2018-01-30T12:33:03.687Z] info: Using config: /home/kiran/zcashnodenew/zcash-bitcore-node.json
[2018-01-30T12:33:03.688Z] info: Using network: testnet
[2018-01-30T12:33:03.688Z] info: Starting bitcoind
[2018-01-30T12:33:03.690Z] info: Using zcash config file: /home/kiran/zcashnodenew/data/zcash.conf
[2018-01-30T12:33:03.691Z] info: Starting zcash process
[2018-01-30T12:33:03.699Z] error: Error: spawn /usr/local/lib/node_modules/zcash-bitcore-node/bin/zcashd ENOENT
at _errnoException (util.js:1003:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:201:19)
at onErrorNT (internal/child_process.js:389:16)
at process._tickCallback (internal/process/next_tick.js:152:19)
</code>
MY Config File (zcash-bitcore-node.json)
{
"network": "testnet",
"port": 3003,
"services": [
"bitcoind",
"insight-api",
"insight-ui",
"web"
],
"servicesConfig": {
"bitcoind": {
"spawn": {
"datadir": "./data",
"exec": "/usr/local/lib/node_modules/zcash-bitcore-node/bin/zcashd"
}
}
}
}
Zcash Config (zcash.conf)
server=1
whitelist=127.0.0.1
txindex=1
addressindex=1
timestampindex=1
spentindex=1
zmqpubrawtx=tcp://127.0.0.1:28332
zmqpubhashblock=tcp://127.0.0.1:28332
rpcallowip=127.0.0.1
rpcuser=bitcoin2
rpcpassword=local321
uacomment=bitcore
Can you please help me with it? What is wrong in which step?

Check out this line the README.
Install
npm install -g zcash-bitcore-node
zcash-bitcore-node start
To install Zcash, follow the Zcash Beta Guide. Point your zcash-bitcore-node.json to $DIR/zcash/src/zcashd.
After installing the zcashd separately and then changing the exec path in my config file to point to that location, it worked properly:
"servicesConfig": {
"bitcoind": {
"spawn": {
"datadir": "/storage/zcash-testnet",
"exec": "/usr/bin/zcashd"
}
},
I know this is quite late, but I hope it helps somebody!
Edit, for clarity..

Related

Installing remote wsl extension cli install not working as expected

Running this command trying to install extension into the remote WSL distro, executing from within a vscode remote terminal window.
Using this as my guide: https://github.com/microsoft/vscode-remote-release/issues/2589
result:
(user) environment ->code --install-extension vscjava.vscode-java-pack --force
Unable to connect to VS Code server: Error in request.
Error: connect EACCES /mnt/wslg/runtime-dir/vscode-ipc-c884c8be-d4c3-4673-895d-71665802af9a.sock
at PipeConnectWrap.afterConnect [as oncomplete] (node:net:1157:16) {
errno: -13,
code: 'EACCES',
syscall: 'connect',
address: '/mnt/wslg/runtime-dir/vscode-ipc-c884c8be-d4c3-4673-895d-71665802af9a.sock'
}
(user) environment ->sudo code --install-extension vscjava.vscode-java-pack --force
sudo: code: command not found
(user) environment ->which code
/home/user/.vscode-server/bin/e2816fe719a4026ffa1ee0189dc89bdfdbafb164/bin/remote-cli/code
(user) environment ->sudo /home/user/.vscode-server/bin/e2816fe719a4026ffa1ee0189dc89bdfdbafb164/bin/remote-cli/code --install-extension vscjava.vscode-java-pack
Command is only available in WSL or inside a Visual Studio Code terminal.
(user) environment ->sudo /home/user/.vscode-server/bin/e2816fe719a4026ffa1ee0189dc89bdfdbafb164/bin/remote-cli/code --install-extension vscjava.vscode-java-pack --force
Command is only available in WSL or inside a Visual Studio Code terminal.
(user) environment ->
Any help greatly appreciated.
Thanks

Why does React app fail to start when running in container, but very same code runs OK when started from terminal?

I learn React and try to run an app. When I start the app in terminal, it goes nice and works as expected, but when I do the very same thing in container it fails. Here are the details:
root#b8457ff69aac:/app# node -v
v16.17.0
root#b8457ff69aac:/app# npm -v
8.15.0
The error:
root#b8457ff69aac:/app# npm start server
> voting_app#1.1.0 start
> npm run server
> voting_app#1.1.0 server
> live-server public --host=localhost --port=9001 --middleware=./disable-browser-cache.js
(node:134) [DEP0111] DeprecationWarning: Access to process.binding('http_parser') is deprecated.
(Use `node --trace-deprecation ...` to show where the warning was created)
Serving "public" at http://localhost:9001 (http://127.0.0.1:9001)
/app/node_modules/opn/index.js:82
reject(new Error('Exited with code ' + code));
^
Error: Exited with code 3
at ChildProcess.<anonymous> (/app/node_modules/opn/index.js:82:13)
at Object.onceWrapper (node:events:628:26)
at ChildProcess.emit (node:events:513:28)
at maybeClose (node:internal/child_process:1093:16)
at Socket.<anonymous> (node:internal/child_process:451:11)
at Socket.emit (node:events:513:28)
at Pipe.<anonymous> (node:net:757:14)
Dockerfile
FROM node:16.17.0
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 9001
# for sake of debug
CMD [ "sleep" , "infinity" ]
And running it:
docker run -p 9001:9001 vote-app:test2
/app/node_modules/opn/index.js:82
reject(new Error('Exited with code ' + code));
hints that the opn module is failing. That module is used to op(e)n a browser, which can't happen in a container.
Add --no-browser to your live-server command line to prevent it trying to open a browser.
Furthermore, you'll need --host=0.0.0.0 instead of --host=localhost so the exposed port can work from within the container.
As an aside, you'll probably also want to see if you can update your version of live-server to get rid of that deprecation warning.

127.0.0.1 live-server in npm can't open in any browser. what is the problem here?

Please anyone help me on my laptop when i live-server public enter after install -g live-server then show this text and not open in browser:-
events.js:291
throw er; // Unhandled 'error' event
^
Error: spawn cmd ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:268:19)
at onErrorNT (internal/child_process.js:468:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Emitted 'error' event on ChildProcess instance at:
at Process.ChildProcess._handle.onexit (internal/child_process.js:274:12)
at onErrorNT (internal/child_process.js:468:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21) {
errno: -4058,
code: 'ENOENT',
syscall: 'spawn cmd',
path: 'cmd',
spawnargs: [ '/c', 'start', '""', '/b', 'http://127.0.0.1:8080' ]
Just run the Command Prompt as Administrator before running live-server and things should work the way they should.
Edit: Actually no. I had the same problem and tried that: it worked but (later discovered) for some reason works only if we run 'live-server' from C:\Windows\System32>. We're back to square one. Sorry.
I had a similar issue now, not exactly the same, but I think my suggested solution will work.
But first, your issue seems you don't have the global node_modules folder in your path. You can check this with echo $PATH from cmd and set it by searching for "environment variables" after pressing windows button once.
Even if most packages suggest installing them with -g this is actually usually not the best, mainly because your project will not be self-contained.
So you will always need to globally install your dependencies when on a new machine, production server, etc...
While it's convenient to not have to download some packages often used on the development machine, it's much safer to run npm/yarn install without -g and then wait for a minute extra after your cloned the project (i bet many people disagree with me on that).
Anyway, there are a few tricks with live-reload and I found it hard to use unless run as a script. Not only because of this reason but also because it looks for .live-reload.json config inside the home folder for the user and this cant be specified as an argument.
TLDR;
This is the relevant parts from my project, this should work for you as well:
package.json
{
scripts:{
"local": "yarn build && node live-server.js",
"build" : "#install other dependencies"
},
"devDependencies": {
"live-server": "^1.2.1"
}
}
live-server.js
var liveServer = require("live-server");
const path = require('path');
var params = {
port: 8181, // Set the server port. Defaults to 8080.
host: "127.0.0.1", // Set the address to bind to. Defaults to 0.0.0.0 or process.env.IP.
root: path.join(__dirname, '/public'), // Set root directory that's being served. Defaults to cwd.
open: true, // When false, it won't load your browser by default.
wait: 100, // Waits for all changes, before reloading. Defaults to 0 sec.
logLevel: 2, // 0 = errors only, 1 = some, 2 = lots
};
liveServer.start(params);

yarn install error:Failed to download Chromium

The Yarn install failed to download Chromium. Error is as follows:
D:\workspace\www\ant-design-mobile-pro
λ yarn
yarn install v1.12.3
//...
Directory: D:\\workspace\\www\\ant-design-mobile-pro\\node_modules\\puppeteer
Output:
ERROR: Failed to download Chromium r599821! Set \"PUPPETEER_SKIP_CHROMIUM_DOWNLOAD\" env variable to skip download.
{ Error: connect ETIMEDOUT 172.217.161.176:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1113:14)
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT',
syscall: 'connect',
address: '172.217.161.176',
success Saved lockfile.
Done in 343.80s.
Question:
Can I download Chromium manually? I can download it from https://npm.taobao.org/mirrors/chromium-browser-snapshots/Win_x64/,the question is: Where should I put it after dowloading it?
If you don't intend to run the automated browser tests which depend upon Chromium, you can skip the install per the error message:
export PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true && yarn
I've occasionally encountered this yarn install timeout recently as well, and no cache clear or other manipulation has seemed to resolve it.

error in bower install angular multiple select module

i want to install bower angular-multiple-select but getting this error every time,any help
$ bower install --savev angular-multiple-select
bower EACCES EACCES, open '/home/ali/.cache/bower/registry/bower.herokuapp.com/lookup/angular- multiple-select_730ad'
> Stack trace: Error: EACCES, open
> '/home/ali/.cache/bower/registry/bower.herokuapp.com/lookup/angular-multiple-select_730ad'
> Console trace: Error
> at StandardRenderer.error (/usr/lib/node_modules/bower/lib/renderers/StandardRenderer.js:81:37)
> at Logger.<anonymous> (/usr/lib/node_modules/bower/lib/bin/bower.js:110:26)
> at Logger.emit (events.js:95:17)
at Logger.emit (/usr/lib/node_modules/bower/lib/node_modules/bower- logger/lib/Logger.js:29:39)
at /usr/lib/node_modules/bower/lib/commands/index.js:48:20
at _rejected (/usr/lib/node_modules/bower/lib/node_modules/q/q.js:844:24)
at /usr/lib/node_modules/bower/lib/node_modules/q/q.js:870:30
at Promise.when (/usr/lib/node_modules/bower/lib/node_modules/q/q.js:1122:31)
at Promise.promise.promiseDispatch (/usr/lib/node_modules/bower/lib/node_modules/q/q.js:788:41)
at /usr/lib/node_modules/bower/lib/node_modules/q/q.js:604:44 System info:
Bower version: 1.7.9
Node version: 0.10.37
OS: Linux
> 3.2.0-97-generic x64
Thanks,
Are you using Linux? You might need to use the sudo command. I.e.
sudo bower install --save angular-multiple-select

Resources