Raneto
Raneto copied to clipboard
multiple instances fails to start
Hello,
While trying to start multiple instances as provided via the multiple-instances.js configuration I receive the following error:
/Users/mpana/Development/help.spearhead.systems/app/index.js:30 if (config.content_dir[config.content_dir.length - 1] !== path.sep) { config.content_dir += path.sep; } ^
TypeError: Cannot read property 'length' of undefined
at initialize (/Users/mpana/Development/help.spearhead.systems/app/index.js:30:45)
at Object.
I added some console.logs here and there trying to find what content_dir should be. By placing a console.log(path.sep) and console.log(content_dir) right before the offending line in server.js I noticed that during startup it iterates three times over this variable and on the third iteration it is undefined:
$ npm start
[email protected] start /Users/mpana/Development/help.spearhead.systems/kb node server.js
/ /Users/mpana/Development/help.spearhead.systems/kb/content/ / /Users/mpana/Development/help.spearhead.systems/kb/content/ / undefined /Users/mpana/Development/help.spearhead.systems/app/index.js:30 if (config.content_dir[config.content_dir.length - 1] !== path.sep) { config.content_dir += path.sep; }
Hopefully someone with a bit more node/javascript experience can help.
The reason for multiple instances is that we would like to run provide multiple languages.
Cheers, Marius