Module version mismatch composer-connector-hlfv1 - hyperledger-composer

I keep getting a "module version mismatch" error when walking through the developer guide tutorial. I'm able to complete almost all of the tutorial (creating and testing my business network, deploying it to local fabric, interacting with it via the rest server), but get an error when running yeoman to create the sample angular app...
~/git/my-test-network$ yo hyperledger-composer:angular
Welcome to the Hyperledger Composer Angular project generator
? Do you want to connect to a running Business Network? Yes
? Project name: my-app
? Description: Commodity
? Author name: t
? Author email: t
? License: Apache-2.0
? Business network identifier: my-test-network
? Connection profile: hlfv1
? Enrollment ID: admin
? Enrollment secret: adminpw
? Do you want to generate a new REST API or connect to an existing REST API? Generate a new REST API
? REST server port: 4000
? Should namespaces be used in the generated REST API? Never use namespaces
events.js:160
throw er; // Unhandled 'error' event
^
Error: Failed to load connector module "composer-connector-hlfv1" for connection profile "hlfv1". Error: Module version mismatch. Expected 48, got 46.
at connectionProfileStore.load.then.e (/usr/local/lib/node_modules/generator-hyperledger-composer/node_modules/composer-common/lib/connectionprofilemanager.js:150:38)
I believe this is related to npm, but I have uninstalled/reinstalled/rebuild several times and the error persists
npm uninstall -g composer-cli
npm uninstall -g composer-rest-server
npm uninstall -g generator-fabric-composer
npm install -g composer-cli
npm install -g composer-rest-server
npm install -g generator-fabric-composer
npm uninstall -g yo
npm install -g yo
my setup ...
Ubuntu 16.04.1 LTS
docker --version Docker version 17.06.0-ce, build 02c1d87
docker-compose --version docker-compose version 1.8.0, build unknown
node --version v6.11.1
npm --version 5.3.0
npm -v composer-cli 5.3.0
npm -v composer-rest-server 5.3.0
npm -v generator-hyperledger-composer 5.3.0
npm -v yo 5.3.0

Please check the output from composer -v
You should be using generator-hyperledger-composer Above I see you installed the old version: npm install -g generator-fabric-composer
Can you please cd into the generated app and rm -r the node_modules directory, and then rerun npm install.

Related

Angular Cli Install

Why when I install globally Angular CLI using command:
npm install -g #angular/cli
with the version of the packages also appears the text
(cli-only)
Thanks

Hyperledger composer CLI installation issues on Ubuntu

I installed composer on AWS ubuntu instance with this command:
npm i -g #composer-cli#0.19
On running this command for checking the installation: composer --help
I got this error
composer command not found
What version of npm are you using? Composer only officially supports npm v5.x and node v8.9.x. In particular, make sure you are not running npm v6 or any higher versions of node, eg node v9 or node v10.
If you see this Link for the installation of the development environment the command for composer installation is:
npm install -g composer-cli#0.19
but you are using
npm i -g #composer-cli#0.19
follow the instructions provided in above link, it will work perfectly fine.

Trying to install ionic globally error on MacbookPro

When launch the command npm install #ionic/cli-framework -g
I have a error 404
Anyone can help me?
thanks
There is no package called #ionic/cli-framework. It's not the valid CLI from the ionic team. The correct command is to run
npm install -g ionic
If you're facing permissions issues, you may need to run that with sudo
sudo npm install -g ionic
Ionic Docs
Try running sudo npm install -g ionic if your are running on a Mac or Linux machine.

Failed to load connector module "composer-connector-hlfv1" for connection profile "defaultProfile"

Using Mac OS 10.12
https://github.com/fabric-composer/sample-applications with commit c5aa100d2532b7ec085a650e515a677dc3446ad2
when I run npm test in getting-started directory, I got below error
error: [Composer-GettingStarted] Error: Failed to load connector module "composer-connector-hlfv1" for connection profile "defaultProfile"
Command failed.
Received answer from fabric-composer channel in Rocket chat. Here's the solution to fix it provided by Dan
this is usually an install issue. Try running npm uninstall -g composer-cli followed by npm install -g composer-cli and check that there are no install issues. Also delete the node_modules folder from getting started and then rerun npm install
this worked for me :
sudo npm uninstall -g composer-rest-server && sudo npm install -g composer-rest-server
When I run ./createPeerAdminCard.sh, I got the same error message.
Try running npm uninstall -g composer-cli followed by npm install -g composer-cli
It's resolved the above work around.
My environment is:
$ uname -a
Linux ubuntu 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ npm ls -g composer-cli
/usr/lib
└── composer-cli#0.16.6
$ composer-rest-server -v
v0.16.6
$ composer-playground --version
0.16.6

Command error running installed npm modules

Hi guys could you help me? i've installed the latest version of node.js and installed cordova and ionic framework the problem starts is when i'm trying to run the ionic command, the console throw me the following message:
MacBook-Pro-de-Diego:~ diegochavez$ ionic start myApp
-bash: ionic: command not found
So then i looked for the root of my npm modules
MacBook-Pro-de-Diego:~ diegochavez$ npm root
/Users/diegochavez/node_modules
if you guys know something to fix this? Thanks in advance
First check if ionic is installed at path like /usr/local/lib/node_modules/ionic/bin/ionic. If it is there, you need to check the npm default global path.
Run command npm config get prefix to check the default path, it should be /usr/local. If it is not /usr/local, run command npm config set prefix /usr/local to set it. And then install again. Also see this answer
I having issue while running - sudo npm install -g gulp ionic with below version of node installed
node -v v0.10.15
npm -v 1.3.5
Error went way after I update node to latest version v0.10.26
The error you are getting is because ionic was not installed successfully. Trying updating node and run command as mentioned sudo npm install -g gulp ionic
Check where your npm folder is located. If your npm folder is located in $Home..then type this:
export PATH="$HOME/npm/bin:$PATH"
You need to run sudo npm install -g ionic from the command line.

Resources