Uibuilder Question on sioUse middleware

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

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

An excess of logging on my part I believe.

uibuilder offers middleware functions for ExpressJS and 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.

Well if it is there it is nothing to do with me as I wouldn't even know where to start :wink: 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.

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?

Yes. File deleted and messages banished

1 Like

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