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

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?

In a terminal run

node-red-stop
node-red-start

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

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.

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

OK Just a minute please

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

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

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

Try. ls -l. Instead of dir

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

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

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

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.

OK ! I will do it, thank you