composer -v
在全局安装 composer-cli 后运行时出现以下错误npm i -g composer-cli
:-
/usr/local/lib/node_modules/composer-cli/node_modules/composer-common/lib/cardstore/businessnetworkcardstore.js:54
async get(cardName) {
^^^SyntaxError: Unexpected identifier
at createScript (vm.js:56:10)
at Object.runInThisContext (vm.js:97:10)
at Module._compile (module.js:542:28)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/usr/local/lib/node_modules/composer-cli/node_modules/composer-common/index.js:56:43)
我执行了以下命令npm ls -g --depth=0
,发现
/usr/local/lib
├── composer-cli@0.19.0
我下载了 Hyperledger Fabric 并尝试在本地运行它的一个实例,FABRIC_VERSION 设置为 hlfv11。当我执行/createPeerAdminCard.sh
此操作时,我会遇到以下错误:-
Development only script for Hyperledger Fabric control
Running 'createPeerAdminCard.sh'
FABRIC_VERSION is set to 'hlfv11'
FABRIC_START_TIMEOUT is unset, assuming 15 (seconds)
No version of composer-cli has been detected, you need to installcomposer-cli at v0.19 or higher
如您所见,我已经安装了 composer-cli@0.19.0.Fabric 无法检测到它的安装。谁能帮我解决这个问题。