You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Composer Playground部署.bna文件报错:Chaincode已安装

Fixing "Chaincode already installed: my-business-network@0.0.2-deploy.2" Error in Composer Playground v0.19.0

This error happens because the exact chaincode version (my-business-network@0.0.2-deploy.2) you’re trying to deploy is already installed on your Fabric peer nodes. Composer Playground blocks duplicate installations to prevent conflicts. Here’s how to fix it:

Step 1: Uninstall the Existing Chaincode

You’ve got two straightforward options for this:

Option A: Use the Composer Playground UI

  • Head to the Peer Admin section in the left sidebar (look for a peer/node icon or "Admin" labeled menu).
  • Find the list of installed chaincodes, locate my-business-network@0.0.2-deploy.2.
  • Click the Uninstall or Delete button next to it (the label might be slightly different in v0.19.0, but it’ll be obvious what to select).

Option B: Use the Fabric CLI (if UI doesn’t work)

If the Playground UI doesn’t show an uninstall option, use the command line to clean up:

  1. Access your Fabric CLI container:
    docker exec -it cli bash
    
  2. Run the chaincode uninstall command (swap out the orderer address if your setup uses a different endpoint):
    peer chaincode uninstall -n my-business-network -v 0.0.2-deploy.2 -o orderer.example.com:7050
    
  3. Exit the CLI container with exit.

Step 2: Redeploy Your Business Network

  • Go back to Composer Playground, re-upload your .bna file, and click Deploy again. This should work now that the duplicate chaincode is removed.

Pro Tip to Avoid This Later

If you’re updating your business network, always increment the version number in your package.json (or business network definition) before repackaging into a .bna file. For example, bump 0.0.2 to 0.0.3—this tells Composer to install a fresh chaincode version instead of trying to reuse the existing one.

内容的提问来源于stack exchange,提问作者PrashantNagawade

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.21 08:29:20