I saw the following code in \node-red\packages\node_modules\@node-red\runtime\lib\storage\localfilesystem\settings.js
, Code comments shows the .config.json file has been removed in 1.3+ . #31
const nodesFilename = getSettingsFilename("nodes");
if (fs.existsSync(nodesFilename)) {
// We have both .config.json and .config.nodes.json
// Use the more recently modified. This handles users going back to pre1.2
// and up again.
// We can remove this logic in 1.3+ and remove the old .config.json file entirely
//
const fsStatNodes = await fs.stat(nodesFilename);
const fsStatGlobal = await fs.stat(globalSettingsFile);
if (fsStatNodes.mtimeMs > fsStatGlobal.mtimeMs) {
// .config.nodes.json is newer than .config.json - no migration needed
return;
}
}
And I did not find this file in User dir
and $HOMEPATH/.Node-Red
. But I noticed that red.js
uses this file when loading configuration files. #107
#110
...
else {
if (fs.existsSync(path.join(process.env.NODE_RED_HOME,".config.json"))) {
// NODE_RED_HOME contains user data - use its settings.js
settingsFile = path.join(process.env.NODE_RED_HOME,"settings.js");
} else if (process.env.HOMEPATH && fs.existsSync(path.join(process.env.HOMEPATH,".node-red",".config.json"))) {
// Consider compatibility for older versions
settingsFile = path.join(process.env.HOMEPATH,".node-red","settings.js");
} else {...
SO... Whether the ".config.json" file has been deprecated?