# Typeerror: send is not a function

**URL:** <https://discourse.nodered.org/t/typeerror-send-is-not-a-function/28602>\
**Category:** General\
**Created:** [19 June 2020 09:49 UTC](https://discourse.nodered.org/t/typeerror-send-is-not-a-function/28602 "2020-06-19T09:49:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![TinAungKhine](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tinaungkhine/32/24199_2.png) [@TinAungKhine](https://discourse.nodered.org/u/TinAungKhine)\
**Post date:** [19 June 2020 09:49 UTC](https://discourse.nodered.org/t/typeerror-send-is-not-a-function/28602/1 "2020-06-19T09:49:24Z")

</div>

Hello everyone,

I face the typerror in node red when connect with ubidots.  
How to solve this problem?

 ![Capture](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/7/e751299d45a7106a736f0984655a069873684fa3.jpeg)

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [19 June 2020 10:10 UTC](https://discourse.nodered.org/t/typeerror-send-is-not-a-function/28602/2 "2020-06-19T10:10:08Z")

</div>

Kind of hard to help when you don't include the flow, the actual name of the node (i.e. node-red-contrib-???) or at least a image of what you have configured in the ubibots node.

---

<div class="post-metadata">

**Author:** ![afelix](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/afelix/32/9743_2.png) [@afelix](https://discourse.nodered.org/u/afelix)\
**Post date:** [19 June 2020 12:05 UTC](https://discourse.nodered.org/t/typeerror-send-is-not-a-function/28602/3 "2020-06-19T12:05:58Z")

</div>

Ubidots uses a different kind of node format, these are their official nodes: [https://flows.nodered.org/node/ubidots-nodered](https://flows.nodered.org/node/ubidots-nodered)  
As the error you're seeing comes from the `in` node that doesn't take any user input to get there, this is likely a bug in the node. From a perspective of node developer, the `send` function is related to sending out messages from a node, so that shouldn't be related to any input in the properties of that node. Can you check the palette (Hamburger menu aka 3 dashes top right -\> manage palette -\> installed nodes -\> ubidots-nodered) to see what the version is of this node that you use, as well as the version of your node-red install (same hamburger menu, the version on the bottom of that menu).

What I think is happening here is that you use a Node-RED version before 1.0.0, and that the following lines of code are hit:

> <https://github.com/ubidots/ubidots-nodered/blob/687ee608e7082455e839827b72254f5f9ed803f6/ubidots/ubidots_in.js#L167-L178>

  
The original format of this on-input function was just the `msg` property, and `send` and `done` were added in 1.0.0 to Node-RED. To create compatible code, as a developer you add a few lines here to check if `send` and `done` are passed as arguments to the function, and if node use the old syntax to do the same.  
**In practice, it means that the current version of this node is only compatible with Node-RED installs of 1.0 and later.**

I just dived in the git history, version `1.2.0` was still compatible with versions below Node-RED 1.0.  
It got added by [this commit](https://github.com/ubidots/ubidots-nodered/pull/17/commits/cc478a8a588a92c17ff1128067a6a92150f49ccf) and wasn't noticed in the extensive code review as part of the pull request. In other words, this is a bug, and should be reported to the ubidots node-red issue page.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [18 August 2020 12:06 UTC](https://discourse.nodered.org/t/typeerror-send-is-not-a-function/28602/4 "2020-08-18T12:06:02Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
