I am trying to generate a business network archive but I am getting the following error while running composer archive create -t dir -n .
Creating Business Network Archive
Looking for package.json of Business Network Definition
SyntaxError: Failed to parse /Users/xxxx@xxxx.com/fabric-tools/tutorial-network/lib/logic.js: Unexpected token (6:6)
Command failed
Unexpected token (6:6)? the content of the logic.js are below:
cat lib/logic.js
/**
* Track the trade of a commodity from one trader to another
* @param {org.acme.mynetwork.Trade} trade - the trade to be processed
* @transaction
*/
async function tradeCommodity(trade) {
trade.commodity.owner = trade.newOwner;
let assetRegistry = await getAssetRegistry('org.acme.mynetwork.Commodity');
await assetRegistry.update(trade.commodity);
}