# Electron + Node-RED = Palette editor disabled

**URL:** https://discourse.nodered.org/t/electron-node-red-palette-editor-disabled/14201
**Category:** General
**Created:** [10 August 2019 19:10 UTC](https://discourse.nodered.org/t/electron-node-red-palette-editor-disabled/14201 "2019-08-10T19:10:40Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![brandlmax](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/brandlmax/32/10808_2.png) [@brandlmax](https://discourse.nodered.org/u/brandlmax)
#### Post date: [10 August 2019 19:10 UTC](https://discourse.nodered.org/t/electron-node-red-palette-editor-disabled/14201/1 "2019-08-10T19:10:40Z")

</div>

Hello everybody,

I'm currently trying to get Node-RED (0.20.7) to run inside Electron (6.0.1).

I use the embedding example code inside the main process:  
[https://nodered.org/docs/user-guide/runtime/embedding](https://nodered.org/docs/user-guide/runtime/embedding)

When I use Electron in dev-mode (npm start), everything works as intended.

But if I build the app for Mac, everything works except for the palette editor, which is not displayed to me. In the console, there is a log: "palette editor disabled". Unfortunately, I don't get more detailed logs from Node-RED in the built version.

I read that the "palette editable" settings will be overwritten / set to false if node-RED does not find npm.  
Does anyone have some idea how I can get the palette editor displayed in the built version? Or can manually pass the path to npm?

Thank you so much,  
Max

---

<div class="post-metadata">

### Author: ![rei\_vilo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rei_vilo/32/162_2.png) [@rei\_vilo](https://discourse.nodered.org/u/rei_vilo)
#### Post date: [11 August 2019 12:07 UTC](https://discourse.nodered.org/t/electron-node-red-palette-editor-disabled/14201/2 "2019-08-11T12:07:05Z")

</div>

Have you had a look at similar projects?

- Node-RED Desktop at [https://github.com/sakazuki/node-red-desktop](https://github.com/sakazuki/node-red-desktop)

- Electron Node-RED at [https://github.com/dceejay/electron-node-red](https://github.com/dceejay/electron-node-red)

---

<div class="post-metadata">

### Author: ![brandlmax](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/brandlmax/32/10808_2.png) [@brandlmax](https://discourse.nodered.org/u/brandlmax)
#### Post date: [13 August 2019 08:30 UTC](https://discourse.nodered.org/t/electron-node-red-palette-editor-disabled/14201/3 "2019-08-13T08:30:01Z")

</div>

Hi rei\_vilo,  
I tried the 2 projects, and with dceejays the same problem occurs, only with sakazuki's version it seems to work, but he has structured everything very differently and doesn't use the embedded code structure of the Node-RED documentation. So maybe it doesn't work with the embedded code example.

Thank you,  
Max

---

<div class="post-metadata">

### Author: ![tfmf](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tfmf/32/34398_2.png) [@tfmf](https://discourse.nodered.org/u/tfmf)
#### Post date: [20 January 2021 10:11 UTC](https://discourse.nodered.org/t/electron-node-red-palette-editor-disabled/14201/4 "2021-01-20T10:11:43Z")

</div>

I was able to solve this in a way, by adding this piece of code to the beginning of the main electron process:

```auto
if (process.platform == 'darwin') {
  process.env.PATH = [
    './node_modules/.bin',
    './node_modules',
    '/usr/local/bin',
    process.env.PATH
  ].join(':');
}

```

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [20 January 2021 10:49 UTC](https://discourse.nodered.org/t/electron-node-red-palette-editor-disabled/14201/5 "2021-01-20T10:49:49Z")

</div>

Is it really darwin specific ? or should/could a more general solution be proposed ?

---

<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: [20 January 2021 10:59 UTC](https://discourse.nodered.org/t/electron-node-red-palette-editor-disabled/14201/6 "2021-01-20T10:59:09Z")

</div>

Any solution that is more generic would also have to handle modules with binary components. They have to be rebuilt against the _electron_ version of Node, not whatever version of Node may be installed on the system.

> **[Using Native Node Modules | Electron](https://www.electronjs.org/docs/tutorial/using-native-node-modules)**

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [20 January 2021 12:22 UTC](https://discourse.nodered.org/t/electron-node-red-palette-editor-disabled/14201/7 "2021-01-20T12:22:43Z")

</div>

well yes for totally general case yes - but just for projects you just need access to git don't you ?

---

<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: [20 January 2021 12:23 UTC](https://discourse.nodered.org/t/electron-node-red-palette-editor-disabled/14201/8 "2021-01-20T12:23:50Z")

</div>

> [@dceejay](#):
>
> but just for projects you just need access to git don't you

No, but this thread is about the palette manager.

---

<div class="post-metadata">

### Author: ![tfmf](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tfmf/32/34398_2.png) [@tfmf](https://discourse.nodered.org/u/tfmf)
#### Post date: [20 January 2021 18:03 UTC](https://discourse.nodered.org/t/electron-node-red-palette-editor-disabled/14201/9 "2021-01-20T18:03:33Z")

</div>

the issue is only in darwin, I was able to make it work in windows.

---

<div class="post-metadata">

### Author: ![tfmf](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/tfmf/32/34398_2.png) [@tfmf](https://discourse.nodered.org/u/tfmf)
#### Post date: [20 January 2021 18:04 UTC](https://discourse.nodered.org/t/electron-node-red-palette-editor-disabled/14201/10 "2021-01-20T18:04:38Z")

</div>

I'm facing this exact issue right now, I have a workaround by changing part of the code in the `install.js` but I think there's more elegant ways to sort this.
