I get this error when I try to save my settings with nconf.
nconf.argv()
.env()
.file({ file: '../../settings.json' });
nconf.set('database:url', 'tcp://node:[email protected]/node');
nconf.set('server:port', 3000);
nconf.save();
{
"process": {
"pid": 21552,
"uid": 502,
"gid": 502,
"cwd": "/Users/mikl/Work/Node/knigu",
"execPath": "/usr/local/Cellar/node/0.6.6/bin/node",
"version": "v0.6.6",
"argv": [
"node",
"/Users/mikl/Work/Node/knigu/bin/knigu",
"generate_chapter_pointers"
],
"memoryUsage": {
"rss": 27222016,
"heapTotal": 16700608,
"heapUsed": 9358504
}
},
"os": {
"loadavg": [
1.7314453125,
1.5009765625,
1.359375
],
"uptime": 113788
},
"trace": [
{
"column": null,
"file": null,
"function": "Function.keys",
"line": null,
"method": "keys",
"native": true
},
{
"column": 12,
"file": "/Users/mikl/Work/Node/knigu/node_modules/nconf/lib/nconf/common.js",
"function": null,
"line": 97,
"method": null,
"native": false
},
{
"column": null,
"file": null,
"function": "Array.forEach",
"line": null,
"method": "forEach",
"native": true
},
{
"column": 8,
"file": "/Users/mikl/Work/Node/knigu/node_modules/nconf/lib/nconf/common.js",
"function": "Object.merge",
"line": 95,
"method": "merge",
"native": false
},
{
"column": 19,
"file": "Object].save (/Users/mikl/Work/Node/knigu/node_modules/nconf/lib/nconf/provider.js",
"function": "[object",
"line": 415,
"method": null,
"native": false
},
{
"column": 9,
"file": "/Users/mikl/Work/Node/knigu/lib/commands/generate_chapter_pointers.js",
"function": null,
"line": 18,
"method": null,
"native": false
},
{
"column": 19,
"file": "/Users/mikl/Work/Node/knigu/node_modules/flatiron/lib/flatiron/plugins/cli.js",
"function": "executeCommand",
"line": 179,
"method": null,
"native": false
},
{
"column": 5,
"file": "/Users/mikl/Work/Node/knigu/node_modules/flatiron/lib/flatiron/plugins/cli.js",
"function": "",
"line": 224,
"method": null,
"native": false
},
{
"column": 21,
"file": "Object].dispatch (/Users/mikl/Work/Node/knigu/node_modules/flatiron/node_modules/director/lib/director/cli.js",
"function": "[object",
"line": 50,
"method": null,
"native": false
},
{
"column": 18,
"file": "/Users/mikl/Work/Node/knigu/node_modules/flatiron/lib/flatiron/plugins/cli.js",
"function": null,
"line": 58,
"method": null,
"native": false
}
],
"stack": [
"TypeError: Object.keys called on non-object",
" at Function.keys (native)",
" at /Users/mikl/Work/Node/knigu/node_modules/nconf/lib/nconf/common.js:97:12",
" at Array.forEach (native)",
" at Object.merge (/Users/mikl/Work/Node/knigu/node_modules/nconf/lib/nconf/common.js:95:8)",
" at [object Object].save (/Users/mikl/Work/Node/knigu/node_modules/nconf/lib/nconf/provider.js:415:19)",
" at /Users/mikl/Work/Node/knigu/lib/commands/generate_chapter_pointers.js:18:9",
" at executeCommand (/Users/mikl/Work/Node/knigu/node_modules/flatiron/lib/flatiron/plugins/cli.js:179:19)",
" at Object.<anonymous> (/Users/mikl/Work/Node/knigu/node_modules/flatiron/lib/flatiron/plugins/cli.js:224:5)",
" at [object Object].dispatch (/Users/mikl/Work/Node/knigu/node_modules/flatiron/node_modules/director/lib/director/cli.js:50:21)",
" at /Users/mikl/Work/Node/knigu/node_modules/flatiron/lib/flatiron/plugins/cli.js:58:18"
],
"level": "error",
"message": "uncaughtException"
}