Themes cause errors. UI not reachable


I installed NR v.1.3.4 on a Debian 10. Then installed NR themes from GitHub - node-red-contrib-themes/theme-collection: Collection of Node-RED themes published by the Node-RED Contrib Themes team by issuing npm install @node-red-contrib-themes/theme-collection.

Then I modified ~/.node-red/settings.js accordingly. The editorTheme now looks like this:

    editorTheme: {
        theme: "dark",
        projects: {
            // To enable the Projects feature, set this value to true
            enabled: false,
            workflow: {
                // Set the default projects workflow mode.
                //  - manual - you must manually commit changes
                //  - auto - changes are automatically committed
                // This can be overridden per-user from the 'Git config'
                // section of 'User Settings' within the editor
                mode: "manual"

Node-red starts normally though I do not see any mention of the theme being loaded:

17 May 10:23:30 - [info] 

Welcome to Node-RED

17 May 10:23:30 - [info] Node-RED version: v1.3.4
17 May 10:23:30 - [info] Node.js  version: v12.22.1
17 May 10:23:30 - [info] Linux 4.19.0-16-amd64 x64 LE
17 May 10:23:30 - [info] Loading palette nodes
17 May 10:23:31 - [info] Dashboard version 2.29.0 started at /ui
17 May 10:23:31 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
17 May 10:23:31 - [info] Settings file  : /home/fred/.node-red/settings.js
17 May 10:23:31 - [info] Context store  : 'default' [module=memory]
17 May 10:23:31 - [info] User directory : /home/fred/.node-red
17 May 10:23:31 - [warn] Projects disabled : editorTheme.projects.enabled=false
17 May 10:23:31 - [info] Flows file     : /home/fred/.node-red/flows_lab.json
17 May 10:23:31 - [info] Server now running at
17 May 10:23:31 - [info] Starting flows
17 May 10:23:31 - [info] Started flows

At this point, the flows are started, I can navigate to the dashboard - it all looks good.

The problem is when I point a browser to the flow editor. I see those messages and the browser tells me it is "unable to connect".

17 May 10:23:31 - [info] [mqtt-broker:Local Mosquitto] Connected to broker: mqtt://lmpi.local:1883
(node:13905) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '_' of undefined
    at Object.context (/usr/lib/node_modules/node-red/node_modules/@node-red/editor-api/lib/editor/theme.js:234:32)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
    at async editor (/usr/lib/node_modules/node-red/node_modules/@node-red/editor-api/lib/editor/ui.js:94:49)
(node:13905) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see (rejection id: 1)
(node:13905) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

I see the HTTP request in Firefox debug's but I can't see any response. The browser tab is "hung". I need to stop the request before seeing the reload option again. Reloading the page has the same effect (keeps waiting for a response).

Removing the theme= entry from the config file resolves the problem but I end up with the white theme.

Can someone tell me what I am doing wrong ?

Hi @TotallyFred - this is a bug that will be fixed in the next release coming this week.

The workaround is to add a page property to your editorTheme:

editorTheme: {
        theme: "dark",
        page: {},
        projects: {
1 Like

Thank you!

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