21 Jan 21:20:44 - [info]
Welcome to Node-RED
===================
21 Jan 21:20:44 - [info] Node-RED version: v4.1.2
21 Jan 21:20:44 - [info] Node.js version: v24.12.0
21 Jan 21:20:44 - [info] Windows_NT 10.0.26200 x64 LE
21 Jan 21:20:44 - [info] Loading palette nodes
21 Jan 21:20:47 - [info] node-red-contrib-telegrambot version: v17.0.3
21 Jan 21:20:50 - [error] 🌐🛑[uibuilder:runtimeSetup] Master .config folder copy ERROR, path: c:\users\oee.hsr\node-red\nr\node_modules\node-red-contrib-uibuilder\templates. Could not copy 'c:\users\oee.hsr\node-red\nr\node_modules\node-red-contrib-uibuilder\templates\.config' to 'c:\users\oee.hsr\node-red\nr\uibuilder\.config'. EPIPE, The process cannot access the file because it is being used by another process. '\\?\c:\users\oee.hsr\node-red\nr\uibuilder\.config' [UibFs:copySync]
21 Jan 21:20:53 - [warn] ------------------------------------------------------
21 Jan 21:20:53 - [warn] [node-red-contrib-uibuilder/uibuilder] Error: [uibuilder:runtimeSetup] Failed to set up uibuilder root folder structure correctly. Check log for additional error messages. Root folder: c:\users\oee.hsr\node-red\nr\uibuilder. (line:337)
21 Jan 21:20:53 - [warn] ------------------------------------------------------
21 Jan 21:20:53 - [info] Settings file : c:\users\oee.hsr\node-red\NR1882\settings.js
21 Jan 21:20:53 - [info] Context store : 'default' [module=memory]
21 Jan 21:20:53 - [info] User directory : c:\users\oee.hsr\node-red\nr
21 Jan 21:20:53 - [warn] Projects disabled : editorTheme.projects.enabled=false
21 Jan 21:20:53 - [info] Flows file : C:/Users/oee.hsr/NODE-RED/NR1882/flows.json
21 Jan 21:20:53 - [info] Server now running at http://127.0.0.1:1882/
21 Jan 21:20:53 - [warn] Using unencrypted credentials
21 Jan 21:20:53 - [info] +-----------------------------------------------------
21 Jan 21:20:53 - [info] | 🌐 uibuilder v7.5.0 initialised
21 Jan 21:20:53 - [info] | root folder: c:\users\oee.hsr\node-red\nr\uibuilder
21 Jan 21:20:53 - [info] | Using Node-RED's webserver at:
21 Jan 21:20:53 - [info] | http://0.0.0.0:1882/
21 Jan 21:20:53 - [info] | Installed packages:
21 Jan 21:20:53 - [warn] Error loading flows: TypeError: Cannot read properties of undefined (reading 'uibuilder')
i have single node_modules directory and i have three instances of NR running with different user directories (1880,1881,1882) but when i restart my PC, (windows, NR running as service(s)) randomly one of the instances was getting into this error, i made delayed start of service for other 2, so one of them got error. if i just restart service of this instance also , it opens without any issue,
How to solve this problem ?
Hmm, appears to be some kind of Windows file lock issue. Not reported before.
The startup always copies over the template files to <uibRoot>/.config so that you always get the latest copies in case you installed a new version of UIBUILDER and they have changed.
I've never seen anyone use the same Node-RED node_modules folder for multiple different instances of Node-RED and I'll bet this doesn't happen on Linux filing systems.
The problem is that this uses Node.js's native cpSync which should be as robust as it can be. So hard to know how to fix this. The cpSync function should not be getting an exclusive lock on the source folder and so this should work. But further investigations show that it does not reliably work.
OK, further investigation shows this to be a common problem for node.js on Windows, exacerbated by you trying to share the node_modules folder which often contains thousands of files and folders that Windows has to work through.
Bottom line
What your user has built is not safe on Windows, even though it looks reasonable on paper.
There is no exclusive folder lock
But there is unavoidable filesystem contention
node_modules magnifies the problem
Errors surfacing at the parent folder are a known Node-on-Windows symptom
One thing that might help you would be to use hard links for the node_modules folder. This might reduce the problem but I can't guarantee it. It appears that the node_modules folder is simply not meant to be used this way. It may well cause other oddities as well. So though it takes up more storage, your instance setup should probably pre-copy the node_modules folder to each instance before Node-RED startup.
I also have issues since flow_cred.json also is 'shared' and gets into trouble whenever i restart the PC, restarting services is ok, ( i have merged all the credentials into one file and stored in directory where node_modules are there)
having node_modules for every instance was unnecessary I thought, somewhere i had read in forum that you can share node_modules for every instance from a central location, but unable to find it now. may be the process is wrong (global install ? or something)
If i cant find a solution, i will make individual folders with node_modules in it.
The default install for node-red is, of course, global and it is possible to install nodes under the global node-red instance and they should be available to all active instances you then run from that global install. However, this is not something I test for with UIBUILDER and I suspect would need some process tweaking to get it to work. I also don't really recommend that approach myself or even the use of a globally installed node-red.