Check that you have declare the function in model file.If you are having space between param end and the function then Hyperledger composer will throw an error
/**
* @param {org.acme.model.Demo} Demo
* @transaction
*/ function Demo (Demo) {
console.log("Hello");
}
Hope this helps you.