you need to pass an npmrc file when you install the business network onto the peers. For more info see the page
which will provide examples on how to do this.
There are several cases where information specific to Hyperledger Fabric must be included in Hyperledger Composer commands, including
composer network install,
composer network start and
composer identity issue. The
--option, -o option and the
--optionsFile, -O option allow connector specific information to be sent.
Multiple options can be specified using the
--option, -o by repeating the tag, for example:
composer somecmd -o thisOpt=value2 -o thatOpt=value2
Alternatively you can create a single file to contain multiple options, for example a file called
To reference an options file, use the following format:
composer somecmd --optionsFile=someCmdOpts.txt
Some API's will also include the option to pass a generic options object including
Providing npm config settings for install
npmrcFile option is available on the
composer network install command.
npmrcFile option allows you to specify npm configuration information when Hyperledger Fabric builds the chaincode image for the Hyperledger Composer runtime.
For example rather than using the default npm registry, you can specify an internal registry within your organization by including the
registry option in an options file:
Supply the fully qualified filename as part of an install command, for example if the file was called npmConfig in your /home/user1/config directory:
Error: Error trying to start business network. Error:
No valid responses from any peers. Response from attempted peer comms was an error: Error: REQUEST_TIMEOUT
composer network start --networkName tutorial-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card -o registry=http://registry.npm.taobao.org
in DevServer_connection.json: change the 3 peers' and orderer's timeout to 1200 in fabric-dev-servers/fabric-scripts/hlfv11/composer/docker-compose-dev.yml add: CORE_CHAINCODE_STARTUPTIMEOUT=1200s
composer network start --networkName tutorial-network --networkVersion 0.0.1 --networkAdmin admin --networkAdminEnrollSecret adminpw --card PeerAdmin@hlfv1 --file networkadmin.card -o npmrcFile=/home/xuzheng/.npmrc
# 指定了.npmrc 文件的路径，该文件用于配置镜像源