Transfer to new pc and dashboard is not working properly

I made a complete app in node red on one windows 11 pc and I like to transfer everything to a new pc.
I copied all the files from one .node-red map to the .new .node-red map.
I can see all my nodes, but I had to add some palettes again on the new pc, like dashboard and ui-builder.
If I start localhost:1880/ui, I don't see my screen in the set colors , I don't see the menu tab at the left side and I don't see the buttons on screen. Even if I change my dashboard theme, nothing is changing on screen.
My ui-builder screen is working.

Do I have to remake my dashboard from scratch or is there something else I can do?

I suggest first deleting, from the .node-red folder, the node-modules folder and the file package-lock.json. Then, in a command window, run [Edit: run it from the .node-red folder]
npm install
That will make sure that you have a set of installed nodes compatible with the OS, tools, and nodejs that are on the new machine.

Then restart node-red. If you still have problems then show us the node red startup log, and check for any errors in the browser developer console.

If I start npm install then I get an error. => npm not being able to find a file.
Do I not put npm install -g --unsafe-perm node-red to install a file?

Copy/paste the full output from the command here please.

No.


C:\Users\benny>npm install
npm error code ENOENT
npm error syscall open
npm error path C:\Users\benny\package.json
npm error errno -4058
npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open 'C:\Users\benny\package.json'
npm error enoent This is related to npm not being able to find a file.
npm error enoent
npm error A complete log of this run can be found in: C:\Users\benny\AppData\Local\npm-cache\_logs\2024-11-02T09_55_08_399Z-debug-0.log

sorry, now I did it in de .node-red map and is is giving some warnings

I should have said go into the .node-red folder to run the command. I will edit my previous post in case anyone else finds this.

C:\Users\benny\.node-red>npm install
npm warn deprecated async-cache@1.1.0: No longer maintained. Use [lru-cache](http://npm.im/lru-cache) version 7.6 or higher, and provide an asynchronous `fetchMethod` option.
npm warn deprecated osenv@0.1.5: This package is no longer supported.
npm warn deprecated har-validator@5.1.5: this library is no longer supported
npm warn deprecated npmlog@2.0.4: This package is no longer supported.
npm warn deprecated rimraf@2.7.1: Rimraf versions prior to v4 are no longer supported
npm warn deprecated gauge@1.2.7: This package is no longer supported.
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated are-we-there-yet@1.1.7: This package is no longer supported.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
npm warn deprecated node-red-contrib-mqtt-broker@0.2.9: deprecated
npm warn deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm warn deprecated fstream@1.0.12: This package is no longer supported.
npm warn deprecated uuid@2.0.3: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm warn deprecated node-uuid@1.4.8: Use uuid module instead
npm warn deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm warn deprecated bson@0.4.23: Fixed a critical issue with BSON serialization documented in CVE-2019-2391, see https://bit.ly/2KcpXdo for more details
npm warn deprecated mongodb@2.1.21: Please upgrade to 2.2.19 or higher
npm warn deprecated tar@2.2.2: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.

added 648 packages, and audited 649 packages in 47s

32 packages are looking for funding
  run `npm fund` for details

28 vulnerabilities (6 moderate, 17 high, 5 critical)

Some issues need review, and may require choosing
a different dependency.

Run `npm audit` for details.

Did you remove the package-lock.json file?

Either way those are just warnings so do not necessarily matter. It does suggest you are using some ancient node types though. For example, node-red-contrib-mqtt-broker has been deleted from github which means it is no longer supported. You would be better to install mosquitto as the broker.

Show us the node red startup log.


C:\Users\benny\.node-red>node-red
2 Nov 11:05:49 - [info]

Welcome to Node-RED
===================

2 Nov 11:05:49 - [info] Node-RED version: v4.0.5
2 Nov 11:05:49 - [info] Node.js  version: v22.11.0
2 Nov 11:05:49 - [info] Windows_NT 10.0.22621 x64 LE
2 Nov 11:05:49 - [info] Loading palette nodes
2 Nov 11:05:55 - [info] Dashboard version 3.6.5 started at /ui
(node:9668) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
2 Nov 11:05:55 - [info] Settings file  : C:\Users\benny\.node-red\settings.js
2 Nov 11:05:55 - [info] Context store  : 'default' [module=memory]
2 Nov 11:05:55 - [info] User directory : \Users\benny\.node-red
2 Nov 11:05:55 - [warn] Projects disabled : editorTheme.projects.enabled=false
2 Nov 11:05:55 - [info] Flows file     : C:\Users\benny\.node-red\flows.json
2 Nov 11:05:55 - [info] Server now running at http://127.0.0.1:1880/
2 Nov 11:05:55 - [warn]

---------------------------------------------------------------------
Your flow credentials file is encrypted using a system-generated key.

If the system-generated key is lost for any reason, your credentials
file will not be recoverable, you will have to delete it and re-enter
your credentials.

You should set your own key using the 'credentialSecret' option in
your settings file. Node-RED will then re-encrypt your credentials
file using your chosen key the next time you deploy a change.
---------------------------------------------------------------------

2 Nov 11:05:55 - [info] +-----------------------------------------------------
2 Nov 11:05:55 - [info] | uibuilder v7.0.4 initialised đź“—
2 Nov 11:05:55 - [info] | root folder: \Users\benny\.node-red\uibuilder
2 Nov 11:05:55 - [info] | Using Node-RED's webserver at:
2 Nov 11:05:55 - [info] |   http://0.0.0.0:1880/
2 Nov 11:05:55 - [info] | Installed packages:
2 Nov 11:05:55 - [info] |   bootstrap, bootstrap-vue, jquery, vue
2 Nov 11:05:55 - [info] +-----------------------------------------------------
2 Nov 11:05:55 - [info] Starting flows
2 Nov 11:05:56 - [info] Started flows
2 Nov 11:06:17 - [info] [mqtt-broker:Brewhouse] Connection failed to broker: mqtt://192.168.0.200:1883

yes, it was deleted

That all looks OK except for the punycode warning, and the connection to the mqtt broker. Is that the right IP address?

Is the dashboard running ok now? Clear the browser cache if it isn't.

Well, the mosquito broker is in a different private network with no internet connection and is not on for the moment. I like to test first if everything else is working. Does that matter, that it is not connected?

No it doesn't matter. I assumed you were using a local broker with node-red-contrib-mqtt-broker. I suggest you look in Configuration Nodes, click Unused and delete any unused ones and deploy. Then check in Manage Palette and remove any unused node types. That might remove the other warning you have.

Does the dashboard work?

Everything should work OK with the MQTT broker inaccessible, except of course you will have to use Inject nodes to simulate MQTT inputs.

If for some reason you don't have a Mosquitto broker on your own LAN it's probably best to use a cloud based one such as Hivemq. They do have a free tier which is great for testing.

The dashboard is still not working like it should be. ( same like before)
node-red is working as a service, can that be a problem?

It should not be a problem, is the startup log from the command node-red-start?

Did you clear the browser cache (using the menus, not hot key)?

As I said at the start, check the browser developer console for errors. How you get to that depends on which browser you are using. It may be Ctrl-Shift-I, or it will be in the browser menu, maybe under More Tools > Developer Tools.

[Edit] You said you are running node red as a service, but the startup log you showed is not from it running as a service!

Can you show us a screen capture of the dashboard as it looks now, and perhaps how it looked on your old PC?

Ok, what I see is that there is a difference starting for cmd line and from service startup.
The start log file is from in the command line : node-red start.
I don't get any node if I start localhost:1880

If I run node red from startup the pc.
If I go to services ( in cmd), then I see node-red running and I can start or stop or restart node-red. But I don't know where I can find the log file when it is started.

that means "Start node red with a flow file named start" - hense being blank.

As you are on windows, there is no log file - your log is the console output.

Sorry, I was thinking this was on a Pi. I don't know about windows. For the moment, stop node-red running as a service and start it by running
node-red
as you did for the log earlier. Note: not node-red start which will try to use a flows file called start. The command on a Pi is node-red-start, which is why I asked about that.
So just, for the moment, use node-red. Once that is working you can see if there is a problem running as a service.