I was writing composer test.In my origin codes, the logic.js include request.post which interact with other server. I add var request = require('request') in the beginning to avoid error which is "error 'request' is not defined". in this way, I can translate the package into a .bna file, and work well. But when I try to write some unit test with 'embeded', the error came up with ReferenceError: require is not defined. I add the 'require' package in my package.json file.
相关问题
- chaincode in hyperledger composer vs chaincode in
- How to get timestamp when transaction is committed
- Instantiating Chaincode in Hyperledger Composer wi
- How to deploy Hyperledger Composer to “Azure Hyper
- Hyperledger-Composer: Issuing identity using REST-
相关文章
- Does Composer needs an already built Fabric networ
- Error: Cannot find module './api' (Hyperle
- how to access the 'eventEmitted' field in
- Hyperledger Composer - ACL Rule with function in c
- Get Count of assets in HyperLedger Composer Query?
- Hyperledger composer network install
- Getting timestamps in deterministic way in Hyperle
- is there any size limit for pdf in hyperledger fab
this is because that
'eslint'
is complaining it doesn't know what to do with request when you runnpm test
etc. We shoud add the comment likefollow the example: https://github.com/hyperledger/composer-sample-networks/blob/master/packages/basic-sample-network/lib/sample.js#L15