Я следовал этому учебнику на macOS и обновился до v0.0.2, используя эти файлы модели .API POST SetupDemo (curl -X POST --header 'Content-Type: application / json' --header 'Принять: application / json' -d '{}' 'http://127.0.0.1:3000/api/SetupDemo') возвращает
{
"error": {
"statusCode": 500,
"name": "Error",
"message": "Error trying invoke business network. Error: No valid responses from any peers.\nResponse from attempted peer comms was an error: Error: transaction returned with failure: ReferenceError: require is not defined",
"stack": "Error: Error trying invoke business network. Error: No valid responses from any peers.\nResponse from attempted peer comms was an error: Error: transaction returned with failure: ReferenceError: require is not defined\n at HLFConnection.invokeChainCode (/Users/jps/.nvm/versions/node/v8.12.0/lib/node_modules/composer-rest-server/node_modules/composer-connector-hlfv1/lib/hlfconnection.js:994:30)\n at <anonymous>"
}
}
API SetupDemo раньше работал в IBM Cloud BC без этой ошибки.
$ node -v
v8.12.0