# Uibuilder Question on sioUse middleware

**URL:** <https://discourse.nodered.org/t/uibuilder-question-on-siouse-middleware/75199>\
**Category:** General\
**Tags:** uibuilder\
**Created:** [14 February 2023 20:15 UTC](https://discourse.nodered.org/t/uibuilder-question-on-siouse-middleware/75199 "2023-02-14T20:15:19Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [14 February 2023 20:15 UTC](https://discourse.nodered.org/t/uibuilder-question-on-siouse-middleware/75199/1 "2023-02-14T20:15:19Z")

</div>

Why am I getting the following error message whenever I deploy? As far as I can see everything is working OK.

```auto
"[uibuilder:socket:onConnect:thermometer] sioUse middleware failed to load for NS thermometer - check that uibRoot/.config/sioUse.js has a valid exported fn."

```

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [14 February 2023 20:25 UTC](https://discourse.nodered.org/t/uibuilder-question-on-siouse-middleware/75199/2 "2023-02-14T20:25:20Z")

</div>

An excess of logging on my part I believe.

uibuilder offers middleware functions for ExpressJS and [Socket.IO](http://Socket.IO). These sit in uibuilder's `.config` folder and you should find several `*.js-template` files there which give examples of use. uibuilder checks to make sure that, if there is, lets say, a `sioUse.js` file, that it contains the correct function style. If not, it will warn you. If you don't have that file there, it shouldn't give a warning but perhaps it is. A small bug that I will make a note of and squash when I get a chance.

The good news is that it does not impact your use of uibuilder. The middleware is ignored and processing continues.

If you do have that file present, it means that it does not contain a valid function and you would need to fix that in order to use the middleware.

---

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [15 February 2023 00:29 UTC](https://discourse.nodered.org/t/uibuilder-question-on-siouse-middleware/75199/3 "2023-02-15T00:29:44Z")

</div>

Well if it is there it is nothing to do with me as I wouldn't even know where to start 😉 The bottom line for me is that I can safely ignore it.

I will check and see if there is a file there.

[Update]  
I have checked and there is an sioUse.js file (1985 so well up to date) but everything in it is commented out.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [15 February 2023 00:50 UTC](https://discourse.nodered.org/t/uibuilder-question-on-siouse-middleware/75199/4 "2023-02-15T00:50:05Z")

</div>

> [@Buckskin](#):
>
> I have checked and there is an sioUse.js file (1985 so well up to date) but everything in it is commented out.

Ah, OK, well that explains it. If there is nothing in it, try renaming or deleting the file. Should be fine.

I assume you are using uibuilder v6.0?

---

<div class="post-metadata">

**Author:** ![Buckskin](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Buckskin](https://discourse.nodered.org/u/Buckskin)\
**Post date:** [15 February 2023 01:13 UTC](https://discourse.nodered.org/t/uibuilder-question-on-siouse-middleware/75199/5 "2023-02-15T01:13:31Z")

</div>

> [@TotallyInformation](#):
>
> I assume you are using uibuilder v6.0?

Yes. File deleted and messages banished

---

<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:** [1 March 2023 01:13 UTC](https://discourse.nodered.org/t/uibuilder-question-on-siouse-middleware/75199/6 "2023-03-01T01:13:33Z")

</div>

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