jeresig / i18n-node-2

Lightweight simple translation module for node.js / express.js with dynamic json storage. Uses common __('...') syntax in app and templates.
MIT License
507 stars 79 forks source link

unexpected error writing files #117

Open jahs4488 opened 6 years ago

jahs4488 commented 6 years ago

2018-02-02 22:54 -06:00: unexpected error writing files (either /locales/es.js.tmp or /locales/es.js are not writeable?): { Error: ENOENT: no such file or directory, stat '/locales/es.js.tmp' at Error (native) at Object.fs.statSync (fs.js:1009:11) at Object.writeFile (/node_modules/i18n-2/i18n.js:437:11) at Object.translate /node_modules/i18n-2/i18n.js:336:10) at Object.__ (/node_modules/i18n-2/i18n.js:153:18) at eval (eval at (/node_modules/ejs-locals/node_modules/ejs/lib/ejs.js:237:14), :30:580) at eval (eval at (/node_modules/ejs-locals/node_modules/ejs/lib/ejs.js:237:14), :30:3499) at /node_modules/ejs-locals/node_modules/ejs/lib/ejs.js:250:15 at Object.exports.render (/node_modules/ejs-locals/node_modules/ejs/lib/ejs.js:288:13) at render (/node_modules/ejs-locals/index.js:334:20) errno: -2, code: 'ENOENT', syscall: 'stat', path: '/locales/es.js.tmp' } 2018-02-02 22:54 -06:00: unexpected .....

Help me!

gjuchault commented 6 years ago

Hi,

You might be using an absolute path on your i18n config. Can you provide your usage of i18n ?