Ubuntu 16.04下Hyperledger Composer v0.18.2升级至v0.19咨询
Got it, let's resolve this version mismatch issue quickly. The root cause here is that the default installation workflow you followed likely installed Composer v0.18.2 by default, but Fabric 1.1 requires Composer v0.19 or higher to work properly. Here's a step-by-step guide to upgrade Composer to v0.19:
Step 1: Uninstall Existing Global Composer Packages
First, we need to remove all the old v0.18.2 Composer packages from your global npm installation to avoid conflicts. Run these commands one by one:
npm uninstall -g composer-cli npm uninstall -g composer-rest-server npm uninstall -g composer-playground npm uninstall -g composer-connector-hlfv1 npm uninstall -g composer-admin npm uninstall -g composer-client
Step 2: Install Composer v0.19 Globally
Next, install the v0.19 versions of all required Composer packages. You can specify the exact patch version (like 0.19.10, the latest stable for v0.19) or just use @0.19 to get the latest in that major version:
npm install -g composer-cli@0.19.10 npm install -g composer-rest-server@0.19.10 npm install -g composer-playground@0.19.10 npm install -g composer-connector-hlfv1@0.19.10 npm install -g composer-admin@0.19.10 npm install -g composer-client@0.19.10
Step 3: Verify the Upgrade
Check that the installation was successful by running:
composer -v
You should see output showing the version is 0.19.x (e.g., 0.19.10).
Step 4: Recreate the PeerAdmin Card
Now go back to your working directory and re-run the card creation script:
./createPeerAdminCard.sh
This should complete without the version mismatch error now.
Additional Note for Local Projects
If you have existing Hyperledger Composer projects, you'll also need to update the dependencies in your project's package.json file. Update all composer-* package versions to ^0.19.10, then run:
npm install
This ensures your project uses the compatible v0.19 libraries.
内容的提问来源于stack exchange,提问作者user9611227

