Unable to Access uibuilder Node Pages

I have obviously messed something up but since upgrading to uiBuilder v 7.4 ( I think) - currently on 7.4.3 - all I get when clicking on open is a blank page with the error message along the top Cannot GET /<name of page>. The browser dev tool shows Failed to load resource: the server responded with a status of 404 (Not Found) under Console.

Rasp pi with Bookworm
Node-RED v4.1.0 Beta 2
uibuilder v7.4.3
Browser MS Edge

Where do I look to find the problem?

PS Also all the uibuilder nodes have a status of configuring node
Node Details also fails
Full Details works

Do you have any errors showing in the Node-RED log?

Can you check your uibRoot folder - typically ~/.node-red/uibuilder/ - does it contain a subfolder named after your uibuilder node "url"?

Yes all the relevant subfolders are present

When I imported an example flow when I first deployed this error message came up

TypeError: fg.convertPathToPattern is not a function
    at fgSync (/home/pi/.node-red/node_modules/node-red-contrib-uibuilder/nodes/libs/fs.cjs:673:12)
    at UibWeb.addInstanceCustomRoutes (/home/pi/.node-red/node_modules/node-red-contrib-uibuilder/nodes/libs/web.js:1144:28)
    at UibWeb.instanceSetup (/home/pi/.node-red/node_modules/node-red-contrib-uibuilder/nodes/libs/web.js:602:14)
    at new nodeInstance (/home/pi/.node-red/node_modules/node-red-contrib-uibuilder/nodes/uibuilder/uibuilder.js:523:9)
    at Object.createNode (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/util.js:211:27)
    at Flow.start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/Flow.js:261:54)
    at async start (/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/flows/index.js:403:17)

the same convertPathToPattern error shows in the log

23 Jul 22:03:15 - [info] Starting flows
23 Jul 22:03:15 - [info] [ui-base:Environment] Node-RED Dashboard 2.0 (v1.25.0) started at /dashboard
23 Jul 22:03:15 - [info] [ui-base:Environment] Created socket.io server bound to Node-RED port at path /dashboard/socket.io
23 Jul 22:03:16 - [error] [uibuilder:c5502f2f307901c6] TypeError: fg.convertPathToPattern is not a function
23 Jul 22:03:16 - [error] [uibuilder:53ef8ecdc8c8ce09] TypeError: fg.convertPathToPattern is not a function
23 Jul 22:03:16 - [info] Started flows
23 Jul 22:03:16 - [info] [sqlitedb:7ef7e7da.8bc2b8] opened /media/usbDrive/HomeAutomation.db ok
23 Jul 22:03:16 - [info] [sqlitedb:b75c11acf2d1b7dd] opened /media/usbDrive/HomeAutomation.db ok
23 Jul 22:03:16 - [info] [mqtt-broker:MQTT] Connected to broker: mqtt://192.168.1.26:1883
23 Jul 22:05:28 - [info] [ui-base:Environment] Disconnected ETYWoX0EygOwikWWAAAD due to ping timeout
23 Jul 23:43:31 - [info] [ui-base:Environment] Disconnected 5WPZAatWzxacBXLUAAAF due to ping timeout
24 Jul 00:44:31 - [info] [ui-base:Environment] Disconnected yGRZIXCty0-gbSkgAAAK due to ping timeout
24 Jul 00:49:57 - [info] [ui-base:Environment] Disconnected jyBDks0gdMUaGyAzAAAO due to transport error
24 Jul 15:23:30 - [info] [ui-base:Environment] Disconnected bxjtT1FsTA03qEVpAAAQ due to ping timeout
24 Jul 22:43:58 - [info] Stopping modified nodes
24 Jul 22:43:58 - [info] Stopped modified nodes
24 Jul 22:43:58 - [info] Updated flows
24 Jul 22:43:58 - [info] Starting modified nodes
24 Jul 22:43:58 - [error] [uibuilder:c5502f2f307901c6] TypeError: fg.convertPathToPattern is not a function
24 Jul 22:43:58 - [error] [uibuilder:53ef8ecdc8c8ce09] TypeError: fg.convertPathToPattern is not a function
24 Jul 22:43:58 - [error] [uibuilder:bb3b15c09b085da2] TypeError: fg.convertPathToPattern is not a function
24 Jul 22:43:58 - [info] Started modified nodes
24 Jul 22:43:58 - [info] 🌐📘[UibFs:replaceTemplate] Successfully copied template blank to Example. cmd=replaceTemplate

Looking at this I am guessing that I am missing something in the settings file

So to be clear Jeff, UIB worked fine before you attempted to update it's version (using 'manage palette'?).
Did the problem start immediately after restarting node-RED/reboot?
Is it possible that you restarted/rebooted prematurely, before the installation was fully completed?

This is strange, I don't think you should need anything special in your settings file and I've updated my live server to v7.4.3 just fine. Though the server I'm testing the beta version of Node-RED is on is Windows rather than Linux.

One thing I am noting though is that the fs library was changed from fs.js to fs.cjs in recent versions. So can I check what version of node.js are you running?

It might be worth you doing this to rebuild your node modules:

cd /home/pi/.node-red
npm rebuild

Then restart Node-RED.

1 Like

Did the npm rebuild on both node-red & uibuilder directories.
Pretty sure that premature restarting / reboot is not the problem as it occurs on 2 node-red instances.

Removed uibuilder from 1 instance and reinstalled. Got this msg

🌐⚠️[uibuilder:package-mgt:setup] uibRoot package.json not found. Copying template file. /home/pi/.node-red/uibuilder

However, this has made uibuilder work once again!!

I will do the same on the other instance. Done. That now works also. Same msg. No idea what caused the problem but it is now resolved

It does seem that something broke as you tried to upgrade previously. I've not experienced this on any of my tests and not had it reported by anyone else but obviously I will keep an eye on things. The original error did suggest a failed install but I've never seen that before.

The warning from your new install is fine. UIBUILDER has its own package.json file in the <uibRoot> folder where front-end library installs are recorded. This keeps them completely separate from Node-RED and makes everything much easier to manage. That package.json also contains a special uibuilder property that records the additional meta-data for installed front-end libraries. UIBUILDER actually compares that package.json against actually installed libraries and will automatically update it in case you manually install a library without using the uibuilder library manager. The warning message simply tells you that uibuilder is using the default package.json file. If you see it again, that would be different and would indicate some other issue. However, I don't expect you will see it again unless you somehow delete the <uibRoot> folder.

The only remaining problem is that one of the uibuilder nodes used vue v2 & bootstrap libraries and I forgot to record the details before I nuked the uibulder directory. Hopefully someone can remind me the names of the npm libraries I have to install!

More thoughts;
The 2 nr instances were both on differing systems, one was a rasp pi and the other was Ubuntu server in a VM running in Win 10, so very weird :face_with_spiral_eyes:

You need to install "vue@2" and "bootstrap-vue".