Not able to run composer rest server - hyperledger-fabric

While starting composer rest server I am getting error :
Connection fails: Error: Failed to load connector module "composer-connector-hlfv1" for connection type "hlfv1". Cannot find module '/home/user/.nvm/versions/node/v8.9.3/lib/node_modules/composer-rest-server/node_modules/grpc/src/node/extension_binary/node-v57-linux-x64/grpc_node.node
there is no grpc_node.node file present in the above folder. I tried reinstalling compoer rest server but no luck.

There are lots of reasons for this. the grpc module is a binary module and usually npm will download a prebuilt binary for your platform. If however it cannot do that (eg server down, or the platform is not recognised) then it will attempt to build the binary from source.
You need to look at the output during the npm -g install of composer-rest-server to see what is reported when npm attempts to install grpc to determine what the problem is.

The following advice from another thread has worked for me. Please try:
Rebuild it
Go to the folder cd '/root/.nvm/versi ons/node/v8.9.1/lib/node_modules/composer-rest-server/'
(into the folder where you have 'composer-rest-server')
then run npm rebuild --unsafe-prem
It will work now
source - Error while generating REST api using hyperledger composer-rest-server in centOS

Related

Domino10 appDevPack: "Error: Cannot find module '#domino/domino-db'"

Just installed the latest Domino 10.0.1 Server on my linux machine and also installed and configured the latest proton package. As far as I can tell it's all running fine.
Next I plan to try my first Node-RED flow using the new Domino10 nodes. So I installed the 'node-red-contrib-dominodb' palette.
Finally tried my first very simple flow trying to query node-demo.nsf as it's described here. From what I read there I assumed that it's sufficient to install the palette, but that obviously is not the case:
as soon as I hit 'Deploy' I receive this error:
Error: Cannot find module '#domino/domino-db'
So I thought that I maybe still have to do a global install in node.js using
npm install -g <package-path>/domino-domino-db-1.1.0.tgz
This indeed created a local #domino/domino-db module inside my node.js npm\node_modules folder. But obviously my node-red environment doesn't know about it.
Question is: how do I register / install that npm package for my local node-red environment?
IBM's instructions (https://flows.nodered.org/node/node-red-contrib-dominodb#Installation)
Say to go view this guide(https://github.com/stefanopog/node-red-contrib-dominodb/blob/master/docs/Using%20the%20new%20Domino%20V10%20NodeRED%20nodes%202.pdf) for installing the domino-db module.
The link is broken, here's an old copy: https://github.com/stefanopog/node-red-contrib-dominodb/blob/a723ef88498c5bfa243abd956a7cc697f0a42610/docs/Using%20the%20new%20Domino%20V10%20NodeRED%20nodes%202.pdf
I believe the section you want is called "Import the tarball". The steps before that require you to unpack and then re-pack the module... which is unnecessary. Just use the tgz that was in the AppDev Pack to begin with.

When attempting to migrate, Truffle (nodeJS) waffles between two errors?

I'm using truffle with a Node.js project, and when I attempt to migrate the project, I get the following error:
Windows Script Host
However, when I use the suggested fix, which is to rename the truffle.js file to something other than truffle.js (i.e. truffle-config.js), then I get a different error:
Could not find suitable configuration file.
When I rename the configuration file back to "truffle.js", then I get the first error all over again.
The solutions I've tried have included using Windows Powershell to run the program and running the command npm install --force -g truffle, neither of which have worked. I've looked into the recommended solution (https://github.com/trufflesuite/truffle/issues/150), and none of the proposed solutions have worked so far.

Mix ecto.create is failing

I am following the guide from phoenix framework to create a simple application under windows 10 local machine. All goes well even after issuing the command mix ecto.create the application is being created but the at the end I am getting an error:
the database hello_phoenix.repo couldn't be created:command timed out
By running mix phoenix.server I am getting further error
Brunch 2+ requires node.js v4 or higher.....
Tried to upgrade with the command
npm i -g brunch#1
but failed several times.
I can load and see the page of phoenix server but without css styles.
how can I fix the errors?
Make sure your DB is up and running.
To see the css applied,
npm install --save babel-preset-es2015

Secure Gateway client not starting on Linux

I have installed the Secure Gateway client (v1.4.2) on RHEL V7. When I attempt to start the client, I receive an error that log4js cannot be found. I am trying to find out where log4js should reside.
enter image description here
Additional information:
Installation was done as follows:
rpm -ivhf ibm_securegateway_client_1.4.2_x86_64.rpm --force
Hardware: Intel (not AMD)
The installation log indicated that the install was successful.
Please add --force option on Redhat Version 7.
rpm -ivhf --force ibm-securegateway-client-1.4.2+client_amd64.rpm
It looks like your node modules did not install correctly. Please ensure you have the correct permissions and reinstall so the node modules can be correctly added.
On a side note, you may encounter issues when attempting to start the client from outside the client directory due to how it searches for the associated files.

broccoli-closure-compiler install error

I am trying to test es-6 promise-polyfill, for the testing one the node packages requried is broccoli-closure-compiler, which is not getting installed, I am behind a proxy server, is that the problem, but i have proxy config for both git and npm, so they are working fine, for more info, please refer to the screenshot of the command prompt,
edit:
the text in screenshot
D:\pt>npm install broccoli-closure-compiler
npm WARN package.json jshint#0.9.1 No repository field.
\
closurecompiler#1.3.2 install D:\pt\node_modules\broccoli-closure-compiler\node_modules\closurecompiler
npm run-script configure
\
closurecompiler#1.3.2 configure D:\pt\node_modules\broccoli-closure-compiler\node_modules\closurecompiler
node scripts/configure.js
Configuring ClosureCompiler.js 1.3.2 ...
Downloading http://dl.google.com/closure-compiler/compiler-latest.tar.gz ...
? Download failed: Error: connect ETIMEDOUT
? Unfortunately, ClosureCompiler.js could not be configured.
See: https://github.com/dcodeIO/ClosureCompiler.js (create an issue maybe)
what I am suggesting is not a solution, these are mere work-around( aka really bad hacks)
if you are facing this, it is because you are behind a proxy server and one of the scripts trying to install clousurecompiler does not have the proxy settings set.
work around one : well, find a way to connect without proxy server, or install in a machine outside proxy server, copy the node_module files to your system,
work around 2 (the one I used) :
when you look at the screenshot, you would notice that at one point "node scripts/configure.js" is run, this is the crucial point, find a way to pause the processing just before this point,
open the 'configure.js' file, it would be at '.\node_modules\broccoli-closure-compiler\node_modules\closurecompiler\scripts' in node project directory,
comment line 65 in that i.e fail(); to //fail();
continue the installation process,
manually download http://dl.google.com/closure-compiler/compiler-latest.tar.gz , put the extracted file at '.\node_modules\broccoli-closure-compiler\node_modules\closurecompiler\compiler' in your project directory
(... told you this is a bad solution )

Resources