watson-developer-cloud / node-red-node-watson

A collection of nodes for the IBM Watson services
Apache License 2.0
82 stars 86 forks source link

"send is not a function" in Watson TTS #470

Closed bernardoluciano closed 4 years ago

bernardoluciano commented 4 years ago

The following error message is being displayed when Watson TTS is triggered: "send is not a function"! Apparently the error started to occur after the last update! If anyone can help with the solution I appreciate it!

Thanks

bernardoluciano commented 4 years ago

The cause could be at line 191(https://github.com/chughts/node-red-node-watson/blob/master/services/text_to_speech/v1.js), where are the command "send (msg);", where I understand it should be "node.send (msg);"

chughts commented 4 years ago

The cause, has explained in the readme is

In the 0.8.x releases the nodes are migrated to a node-red 1.0.x input event callback function signature. and migrated off watson-developer-cloud to ibm-watson as a npm dependancy. Migrated nodes will not be compatible with pre 1.0.0 versions of node-red. During the migration there will be a dependancy on both modules.

The TTS node was converted in 0.8.0, as a consequence you will need to upgrade node-red to 1.0.x. I think the current version is 1.0.3

If you wish to remain on an earlier version of node-red, then you need to stick to version 0.7.8 of node-red-node-watson