-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Cannot read property 'translator' of undefined #108
Comments
did you init 18next? can you paste your config? |
I had to assign the whole i18n instance object to pug (formerly jade) locals instead just the |
https://github.com/i18next/i18next-express-middleware might be what you search |
we assign t to locals like: https://github.com/i18next/i18next-express-middleware/blob/master/src/index.js#L33 |
Hello friends.
I found this error in the server log and the application does not work. What can it be?
TypeError: Cannot read property 'translator' of undefined at t (/home/myapp/app/node_modules/i18next/dist/commonjs/i18next.js:315:16) at eval (eval at <anonymous> (/home/myapp/app/node_modules/jade/lib/index.js:218:8), <anonymous>:1192:482) at eval (eval at <anonymous> (/home/myapp/app/node_modules/jade/lib/index.js:218:8), <anonymous>:1598:129) at res (/home/myapp/app/node_modules/jade/lib/index.js:219:38) at Object.exports.renderFile (/home/myapp/app/node_modules/jade/lib/index.js:380:38) at Object.exports.renderFile (/home/myapp/app/node_modules/jade/lib/index.js:370:21) at View.exports.__express [as engine] (/home/myapp/app/node_modules/jade/lib/index.js:417:11) at View.render (/home/myapp/app/node_modules/express/lib/view.js:126:8) at tryRender (/home/myapp/app/node_modules/express/lib/application.js:639:10) at EventEmitter.render (/home/myapp/app/node_modules/express/lib/application.js:591:3) TypeError: Cannot read property 'translator' of undefined at t (/home/myapp/app/node_modules/i18next/dist/commonjs/i18next.js:315:16) at eval (eval at <anonymous> (/home/myapp/app/node_modules/jade/lib/index.js:218:8), <anonymous>:1192:482) at eval (eval at <anonymous> (/home/myapp/app/node_modules/jade/lib/index.js:218:8), <anonymous>:1598:129) at res (/home/myapp/app/node_modules/jade/lib/index.js:219:38) at Object.exports.renderFile (/home/myapp/app/node_modules/jade/lib/index.js:380:38) at Object.exports.renderFile (/home/myapp/app/node_modules/jade/lib/index.js:370:21) at View.exports.__express [as engine] (/home/myapp/app/node_modules/jade/lib/index.js:417:11) at View.render (/home/myapp/app/node_modules/express/lib/view.js:126:8) at tryRender (/home/myapp/app/node_modules/express/lib/application.js:639:10) at EventEmitter.render (/home/myapp/app/node_modules/express/lib/application.js:591:3) TypeError: Cannot read property 'translator' of undefined at t (/home/myapp/app/node_modules/i18next/dist/commonjs/i18next.js:315:16) at eval (eval at <anonymous> (/home/myapp/app/node_modules/jade/lib/index.js:218:8), <anonymous>:266:1647) at eval (eval at <anonymous> (/home/myapp/app/node_modules/jade/lib/index.js:218:8), <anonymous>:272:23) at res (/home/myapp/app/node_modules/jade/lib/index.js:219:38) at Object.exports.renderFile (/home/myapp/app/node_modules/jade/lib/index.js:380:38) at Object.exports.renderFile (/home/myapp/app/node_modules/jade/lib/index.js:370:21) at View.exports.__express [as engine] (/home/myapp/app/node_modules/jade/lib/index.js:417:11) at View.render (/home/myapp/app/node_modules/express/lib/view.js:126:8) at tryRender (/home/myapp/app/node_modules/express/lib/application.js:639:10) at EventEmitter.render (/home/myapp/app/node_modules/express/lib/application.js:591:3)
The text was updated successfully, but these errors were encountered: