seneca-mesh
seneca-mesh copied to clipboard
mesh does not work
err: CL MISSING { color: 'red', format: 'hex' }
Same here. Additionally the quick example in the readme is not consistent with the example "05-readme"
// this part is omitted in the readme
.listen(9001)
If I remove the part above the service seems to work but the client complains w msg: 'seneca: No matching action pattern found for { format: \'hex\', color: \'red\' }, and no default result provided (using a default$ property).',
Same error here: CL MISSING { format: 'hex', color: 'red' }
Seems to be a problem with the [email protected]
release. [email protected]
works.
I had the same issue with color-client.js
in examples/30-multicast-discovery
folder. Then I noticed that the latest version (0.10.0) published to NPM is quite old ( March 7), so I tried the master branch, but I still got the same error. Then I checked the api-service.js
in examples/30-multicast-discovery
folder, and it worked, although the code block which sends the message looked very similar to the one in color-client.js
. There was one outstanding difference: in color-client.js
there was no seneca.ready()
. It turned out that adding this solved the problem. My working color-client.js
is:
var Seneca = require('seneca')
Seneca({tag: 'client', log: 'silent'})
.use('../..')
.ready(function () {
this.act(
{
role: 'color',
format: process.argv[2] || 'hex',
color: process.argv[3] || 'red'
},
function (err, out) {
console.log(err && err.message || out.color)
this.close()
})
})
Using master branch is not a real solution for this problem, but I hope this helps. @rjrodger is there a plan for shipping a new (or a quickfix) version to NPM?
@sirudog, I had the same issue with [email protected] and [email protected]. I was able to make it work by adding the client act registration in the ready method as you recommended. I am new to Seneca-mesh and Senecajs in general. I came here after ready @rjrodger book The Tao of Microservices. I believe that the framework could benefit from better/updated documentation. I am ready to help !
HI I am still getting the same error
seneca: No matching action pattern found for { role: 'color', format: 'hex', color: 'red' }, and no default result provided (using a default$ property)
My node version is 8.12.0
Can you please help me with this.