package.json的内容如下:
{
"name": "fabric-nodejs",
"version": "1.0.0",
"description": "Hyperledger Fabric Node SDK Test Application",
"scripts": {
"test": "echo \\"Error: no test specified\\" && exit 1"
},
"dependencies": {
"fabric-ca-client": "^1.0.0",
"fabric-client": "^1.0.0"
},
"author": "NodeJS Fabric",
"license": "Apache-2.0",
"keywords": [
"Hyperledger",
"Fabric",
"Test",
"Application"
]
}
npm install --registry=https://registry.npm.taobao.org
按照 https://www.cnblogs.com/studyzy/p/7524245.html 执行 query.js 时 报错
/root/fabric-nodejs/node_modules/fabric-client/lib/Client.js:742
async _createOrUpdateChannel(request, have_envelope) {
^^^^^^^^^^^^^^^^^^^^^^
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> (/root/fabric-nodejs/node_modules/fabric-client/index.js:25:18)