Next-i18next: Support Now V2 deployment ?

Created on 4 Dec 2018  路  5Comments  路  Source: isaachinman/next-i18next

Is there anyway to drop out middleware and using only (req, res) instead ? It'll help us using this library with Now V2 lambda deployment.

question

Most helpful comment

sorry, just once again for the stupid :D So there is now way to deploy a nextjs.app with next-i18next to ZEIT/Now?

All 5 comments

In general, no. We rely on i18next-express-middleware, and need access to the express server.get and server.use functions as well as the next app.render function to be able to manipulate routes.

It would be great to be able to reduce down to just req, res as that's obviously a lot less opinionated, but it would be extremely difficult to do. Unfortunately I suggest you create your own implementation.

@revskill10 hello, I'm also struggling with Now 2.0 deployment. Could you clarify what is the issue you had with it? Also do you think it can be resolved with this PR?

I'm having an issue when getAllNamespaces cannot find /static/ dir using process.cwd(), and I'm wondering if it has anything to do with what you mentioned :) cheers

@bel0v I mean serverless deployment for @now/node at least, in which all you write is not a server instance, but a function (req, res) =>.
I used another solution for i18n, which is generic for React (not only NextJS).

@revskill10, can you please tell which i18n tool you used?

sorry, just once again for the stupid :D So there is now way to deploy a nextjs.app with next-i18next to ZEIT/Now?

Was this page helpful?
0 / 5 - 0 ratings