Add Monaco Editor - how?

hello
on a VM i installed node Red 2
so far it works!
i wish to change to the monaco editor

node-red -v

[info] Einstellungsdatei: /root/.node-red/settings.js

so i edited the file and aroud line 353
i changed the lib acs to monaco

did a reboot
but still the editor did not change

so i belive i would have to install it too so i did a

npm i monaco-editor

restarted node red but still the editor is not monaco

so what do i miss?

have a nice day
vinc

This is not necessary and won't work. Monaco was specially prepared/compiled for use in node-red & is included in the installation of node-red.

My guess is you have once started node red as root (that's why there is a .node-red folder there) BUT I suspect node-red starts up automatically as a different non root user. In essence, you have modified the wrong settings.js file.

This rings a bell :point_up:

What user were you logged in as when you installed node-red? Log in as that user & modify settings.js in the ~/.node-red folder

you are fast @Steve-Mcl
Merci for your feedback.

is it documented which file to use?

# find / -name settings.js
/home/nodered/.node-red/settings.js
/usr/lib/node_modules/node-red/settings.js
/usr/lib/node_modules/node-red/node_modules/node-red-admin/settings.js
/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/settings.js
/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/api/settings.js
/usr/lib/node_modules/node-red/node_modules/@node-red/runtime/lib/storage/localfilesystem/settings.js
/usr/lib/node_modules/node-red/node_modules/@node-red/editor-api/lib/editor/settings.js
/usr/lib/node_modules/node-red/node_modules/@node-red/editor-api/lib/admin/settings.js

See my previous reply.

it runs under nodered

nodered 4212 1.0 4.9 876660 101124 ? SNsl 23:52 0:03 node-red

So log in as that user & edit the settings as I described.

i think i messed up - it start as user nodered but was installed as root. so i will have to set up it again it seems.

Node-RED logs the path to its settings file when it starts.

From the files you've listed, /home/nodered/.node-red/settings.js will be the right one.

No need to reinstall if you aren't running as root.

@knolleary thanks for your feedback.
Done so at line
353 lib: "monaco",

only to stop and start the service did not work. Reboot of the VM seems to have activated Monaco.

But using a new function, i am able to add the name but can't add or edit the text in function itself

have a nice day
vinc

You have a node or nodes that are breaking it.

See this link for how to fix.

@Steve-Mcl Merci

node-red-contrib-zigbee2mqtt 1 - issue raised 2 - fixed in v0.6.9
OK

node-red-contrib-deconz 1 - Issue raised 3 - fixed in v1.3.3

the deconz update is not showing Up in the GUI, so i still have v1.3.2 and this make the brake.

Try updating again in 20 mins, just refreshed the node on flows library (refresh browser before each attempt)

i removed deconz on node red 2 and now it works
so this part will stay on my old node Red 1.x

and i can go on with moving my nodes to Node Red 2 and cleaning up the nodes :wink:

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