# Add Monaco Editor - how?

**URL:** <https://discourse.nodered.org/t/add-monaco-editor-how/48896>\
**Category:** General\
**Created:** [25 July 2021 21:40 UTC](https://discourse.nodered.org/t/add-monaco-editor-how/48896 "2021-07-25T21:40:47Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [25 July 2021 21:40 UTC](https://discourse.nodered.org/t/add-monaco-editor-how/48896/1 "2021-07-25T21:40:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [25 July 2021 21:48 UTC](https://discourse.nodered.org/t/add-monaco-editor-how/48896/2 "2021-07-25T21:48:50Z")

</div>

> [@vikozo](#):
>
> so i belive i would have to install it too so i did a
> 
> npm i monaco-editor

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.

> [@vikozo](#):
>
> [info] Einstellungsdatei: /root/.node-red/settings.js

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.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [25 July 2021 21:54 UTC](https://discourse.nodered.org/t/add-monaco-editor-how/48896/3 "2021-07-25T21:54:40Z")

</div>

> [@Steve-Mcl](#):
>
> I suspect node-red starts up automatically as a different non root user

This rings a bell ☝

> [@\# node-red command gives a error](https://discourse.nodered.org/t/node-red-command-gives-a-error/48825/2):
>
> You shouldn't really run node-red as root unless it is for a specific reason and the is no other solution.

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

---

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [25 July 2021 21:54 UTC](https://discourse.nodered.org/t/add-monaco-editor-how/48896/4 "2021-07-25T21:54:51Z")

</div>

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

is it documented which file to use?

```auto
# 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

```

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [25 July 2021 21:55 UTC](https://discourse.nodered.org/t/add-monaco-editor-how/48896/5 "2021-07-25T21:55:23Z")

</div>

See my previous reply.

---

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [25 July 2021 21:57 UTC](https://discourse.nodered.org/t/add-monaco-editor-how/48896/6 "2021-07-25T21:57:15Z")

</div>

it runs under nodered

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

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [25 July 2021 21:57 UTC](https://discourse.nodered.org/t/add-monaco-editor-how/48896/7 "2021-07-25T21:57:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [25 July 2021 22:07 UTC](https://discourse.nodered.org/t/add-monaco-editor-how/48896/8 "2021-07-25T22:07:23Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [25 July 2021 22:13 UTC](https://discourse.nodered.org/t/add-monaco-editor-how/48896/9 "2021-07-25T22:13:12Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [26 July 2021 07:12 UTC](https://discourse.nodered.org/t/add-monaco-editor-how/48896/10 "2021-07-26T07:12:16Z")

</div>

@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

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [26 July 2021 07:32 UTC](https://discourse.nodered.org/t/add-monaco-editor-how/48896/11 "2021-07-26T07:32:06Z")

</div>

> [@vikozo](#):
>
> But using a new function, i am able to add the name but can't add or edit the text in function itself

You have a node or nodes that are breaking it.

See [this link](https://discourse.nodered.org/t/node-red-2-0-released/48647/43) for how to fix.

---

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [27 July 2021 15:10 UTC](https://discourse.nodered.org/t/add-monaco-editor-how/48896/12 "2021-07-27T15:10:06Z")

</div>

@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.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [27 July 2021 15:33 UTC](https://discourse.nodered.org/t/add-monaco-editor-how/48896/13 "2021-07-27T15:33:21Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![vikozo](https://avatars.discourse-cdn.com/v4/letter/v/858c86/32.png) [@vikozo](https://discourse.nodered.org/u/vikozo)\
**Post date:** [27 July 2021 15:38 UTC](https://discourse.nodered.org/t/add-monaco-editor-how/48896/14 "2021-07-27T15:38:39Z")

</div>

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 😉

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [25 September 2021 15:39 UTC](https://discourse.nodered.org/t/add-monaco-editor-how/48896/15 "2021-09-25T15:39:25Z")

</div>

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