I have backend service with translation using NPM module for translation - https://github.com/dfellis/node-localize
Everything works fine in debug environment, but during deployment I receive this error:
Can not parse generic service: BackendlessServerException: Undefined error, cause [CodeRunnerError] Code: 0; Msg: Translation Path Invalid; Class: java.lang.Exception
Meaning that location module cannot find path which is currently in root app folder:
let myLocalize = new Localize(’./app/’);
I tried to place that class into separate directory and update path, but it was with same result.
Can you please post here correct way how to setup path correctly ?!
Use relative path to the file where you create the Localize instance :
const Localize = require(‘localize’);
const path = require(‘path’);
const localize = new Localize(path.resolve(__dirname, ‘./translations/’));
http://support.backendless.com/public/attachments/638a0276418ae19eb256887775b954f7.png</img>