Skip to content
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

Update Documentation #1251

Closed
wants to merge 1 commit into from
Closed

Update Documentation #1251

wants to merge 1 commit into from

Conversation

samcx
Copy link

@samcx samcx commented Jun 10, 2021

Issue

We've been getting cases where users are not able to build their Next.js page when using this package (working locally but not on Vercel).

It turns out people are using getServerSideProps for their page, which I believe is not supposed to work since the documentation also states getInitialProps does not work (both methods are almost identical).

When accessing the getServerSideProps page →

CleanShot 2021-06-10 at 02 50 42@2x

@vercel
Copy link

vercel bot commented Jun 10, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/isaachinman/next-i18next/FRfzKDzKwgZpRzGsFeBxaGWkHSSM
✅ Preview: https://next-i18next-git-fork-vercel-support-update-docs-isaachinman.vercel.app

@isaachinman
Copy link
Contributor

isaachinman commented Jun 10, 2021

The getServerSideProps data fetching method absolutely is supported. What you are encountering is a drawback of Vercel's serverless architecture, which has been raised and answered countless times in issues on this repo. You will need to use path.resolve to instruct the Vercel platform to keep those localisation files in the serverless output.

Feel free to search existing issues, eg: #1141

@samcx
Copy link
Author

samcx commented Jun 10, 2021

@isaachinman Thanks for the clarification. Would it be possible to add documentation for getServerSideProps?

@isaachinman
Copy link
Contributor

Hi @samsisle – this issue is not specific to getServerSideProps, it affects all data-fetching methods. Sure, we could add documentation about Vercel-specific requirements in the notes section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants