-
Notifications
You must be signed in to change notification settings - Fork 0
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
Error when using inside components #2
Comments
Hi, This is designed to be used server side on the assumption you're using i18next middleware in something like express. The 'of undefined' will be the output stream. I should have probably made that clear in the documentation! |
Yes, I'm using i18next middleware with express. I just don't understand why the pages render correctly, successfully translating the page, but printing that error on browser's console. And thank you for your quick reply! |
Adding a class {} section declarings the client side widget code, that must be causing the .t() funciton to be called clientside as well as I guess? Maybe there's a way around that. For now I'd just avoid adding a class{} section if you don't need one. |
The problem is that I have lots of routes with client side code that need translations. But no worries, I'll try to see if someone in gitter have a workaround for this. I'll keep you posted! |
Thanks, currently I'm only using the server side rendering aspects of marko in my services, so I haven't encounter this issue. If you can find a way to fix it, or better yet, add client side translation support into component, that would be great! |
I'm getting this error - Cannot read property 'req' of undefined - when using it like this:
If I remove the class definition, it works without errors.
Do you know what the problem might be?
The text was updated successfully, but these errors were encountered: