# Editing Settings.js Files Problem , I'm still finding the Settings.js file empty?

**URL:** <https://discourse.nodered.org/t/editing-settings-js-files-problem-im-still-finding-the-settings-js-file-empty/10120>\
**Category:** General\
**Created:** [14 April 2019 09:54 UTC](https://discourse.nodered.org/t/editing-settings-js-files-problem-im-still-finding-the-settings-js-file-empty/10120 "2019-04-14T09:54:04Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jackyee](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@Jackyee](https://discourse.nodered.org/u/Jackyee)\
**Post date:** [14 April 2019 09:54 UTC](https://discourse.nodered.org/t/editing-settings-js-files-problem-im-still-finding-the-settings-js-file-empty/10120/1 "2019-04-14T09:54:04Z")

</div>

After the trouble of searching, I found the settings.js file in /home/pi/.node-red but when I run it by Nano Editor it appears empty without any line and I don't know what the problem is, in previous versions, I could edit it ! what the solution is?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [14 April 2019 10:15 UTC](https://discourse.nodered.org/t/editing-settings-js-files-problem-im-still-finding-the-settings-js-file-empty/10120/2 "2019-04-14T10:15:38Z")

</div>

In a terminal run

```bash
node-red-stop
node-red-start

```

and copy/paste what you see here. That may give us some clues.

---

<div class="post-metadata">

**Author:** ![Jackyee](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@Jackyee](https://discourse.nodered.org/u/Jackyee)\
**Post date:** [14 April 2019 12:06 UTC](https://discourse.nodered.org/t/editing-settings-js-files-problem-im-still-finding-the-settings-js-file-empty/10120/3 "2019-04-14T12:06:40Z")

</div>

I see nothing, I used \< nano ~ / .node-red / settings.js \> cuz I need to edit the file but I don't see the lines inside it.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [14 April 2019 12:38 UTC](https://discourse.nodered.org/t/editing-settings-js-files-problem-im-still-finding-the-settings-js-file-empty/10120/4 "2019-04-14T12:38:00Z")

</div>

I meant run those commands and copy/paste what appears in the terminal.

---

<div class="post-metadata">

**Author:** ![Jackyee](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@Jackyee](https://discourse.nodered.org/u/Jackyee)\
**Post date:** [14 April 2019 12:50 UTC](https://discourse.nodered.org/t/editing-settings-js-files-problem-im-still-finding-the-settings-js-file-empty/10120/5 "2019-04-14T12:50:01Z")

</div>

OK Just a minute please

---

<div class="post-metadata">

**Author:** ![Jackyee](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@Jackyee](https://discourse.nodered.org/u/Jackyee)\
**Post date:** [14 April 2019 12:52 UTC](https://discourse.nodered.org/t/editing-settings-js-files-problem-im-still-finding-the-settings-js-file-empty/10120/6 "2019-04-14T12:52:32Z")

</div>

# Starting as a systemd service. Started Node-RED graphical event wiring tool. 14 Apr 16:50:35 - [info] Welcome to Node-RED

## 14 Apr 16:50:35 - [info] Node-RED version: v0.20.5 14 Apr 16:50:35 - [info] Node.js version: v8.15.1 14 Apr 16:50:35 - [info] Linux 4.14.71-v7+ arm LE 14 Apr 16:50:36 - [info] Loading palette nodes 14 Apr 16:50:48 - [info] Dashboard version 2.14.0 started at /ui 14 Apr 16:50:49 - [warn] ------------------------------------------------------ 14 Apr 16:50:49 - [warn] [node-red-contrib-mqtt-dynamictopic/mqtt-dynamic] Type already registered 14 Apr 16:50:49 - [warn] ------------------------------------------------------ 14 Apr 16:50:49 - [info] Settings file : /home/pi/.node-red/settings.js 14 Apr 16:50:49 - [info] Context store : 'default' [module=memory] 14 Apr 16:50:49 - [info] User directory : /home/pi/.node-red 14 Apr 16:50:49 - [warn] Projects disabled : set editorTheme.projects.enabled=true to enable 14 Apr 16:50:49 - [info] Flows file : /home/pi/.node-red/flows\_raspberrypi.json 14 Apr 16:50:49 - [info] Server now running at [http://127.0.0.1:1880/](http://127.0.0.1:1880/) 14 Apr 16:50:49 - [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.

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [14 April 2019 13:00 UTC](https://discourse.nodered.org/t/editing-settings-js-files-problem-im-still-finding-the-settings-js-file-empty/10120/7 "2019-04-14T13:00:06Z")

</div>

so cd into your .node-red directory

list all the files using ls command to check the settings.js file exists and has a size (i.e it’s not a blank file)

and then when you know you are in the right directory and it has a size  
try running the nano command again

nano settings.js

---

<div class="post-metadata">

**Author:** ![Jackyee](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@Jackyee](https://discourse.nodered.org/u/Jackyee)\
**Post date:** [14 April 2019 13:45 UTC](https://discourse.nodered.org/t/editing-settings-js-files-problem-im-still-finding-the-settings-js-file-empty/10120/8 "2019-04-14T13:45:41Z")

</div>

pi@raspberrypi:~ cd ~/.node-red pi@raspberrypi:~/.node-red dir  
flows\_raspberrypi\_cred.json package.json settings.js.save.1  
flows\_raspberrypi.json package-lock.json settings.js.save.2  
lib settings.js  
node\_modules settings.js.save

---

<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:** [14 April 2019 14:08 UTC](https://discourse.nodered.org/t/editing-settings-js-files-problem-im-still-finding-the-settings-js-file-empty/10120/9 "2019-04-14T14:08:51Z")

</div>

Try. ls -l. Instead of dir

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [14 April 2019 14:09 UTC](https://discourse.nodered.org/t/editing-settings-js-files-problem-im-still-finding-the-settings-js-file-empty/10120/10 "2019-04-14T14:09:54Z")

</div>

and building on @dceejay reply if you use the man command you can see what other options a command has

---

<div class="post-metadata">

**Author:** ![Jackyee](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@Jackyee](https://discourse.nodered.org/u/Jackyee)\
**Post date:** [14 April 2019 14:14 UTC](https://discourse.nodered.org/t/editing-settings-js-files-problem-im-still-finding-the-settings-js-file-empty/10120/11 "2019-04-14T14:14:19Z")

</div>

total 252  
-rw-r--r-- 1 pi pi 72 Apr 14 16:07 flows\_raspberrypi\_cred.json  
-rw-r--r-- 1 pi pi 14015 Apr 14 17:12 flows\_raspberrypi.json  
drwxr-xr-x 3 pi pi 4096 Apr 12 16:54 lib  
drwxr-xr-x 500 pi pi 20480 Apr 12 22:31 node\_modules  
-rw-r--r-- 1 pi pi 847 Apr 12 22:31 package.json  
-rw-r--r-- 1 pi pi 194628 Apr 12 22:31 package-lock.json  
-rw-r--r-- 1 pi pi 0 Apr 12 16:54 settings.js  
-rw-r--r-- 1 pi pi 1 Apr 12 22:07 settings.js.save  
-rw-r--r-- 1 pi pi 17 Apr 12 22:12 settings.js.save.1  
-rw-r--r-- 1 pi pi 1 Apr 14 13:58 settings.js.save.2

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [14 April 2019 15:04 UTC](https://discourse.nodered.org/t/editing-settings-js-files-problem-im-still-finding-the-settings-js-file-empty/10120/12 "2019-04-14T15:04:21Z")

</div>

So that shows that the settings.js file now has no content and the time it was last changed. The .save files must be from when you have been trying to edit it.

As it has zero content, you could try deleting it (and the .save files) and then restarting Node-RED

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [14 April 2019 15:48 UTC](https://discourse.nodered.org/t/editing-settings-js-files-problem-im-still-finding-the-settings-js-file-empty/10120/13 "2019-04-14T15:48:49Z")

</div>

Also note that the node node-red-contrib-mqtt-dynamictopic is conflicting with another node. You should uninstall one of them. This is nothing to do with the empty settings file however. I wonder how that happened.

---

<div class="post-metadata">

**Author:** ![Jackyee](https://avatars.discourse-cdn.com/v4/letter/j/cdc98d/32.png) [@Jackyee](https://discourse.nodered.org/u/Jackyee)\
**Post date:** [14 April 2019 15:50 UTC](https://discourse.nodered.org/t/editing-settings-js-files-problem-im-still-finding-the-settings-js-file-empty/10120/14 "2019-04-14T15:50:00Z")

</div>

OK ! I will do it, thank you
