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

Next JS - Revalidate missing from some pages #3617

Closed
5 tasks done
multivoltage opened this issue Jul 25, 2023 · 9 comments
Closed
5 tasks done

Next JS - Revalidate missing from some pages #3617

multivoltage opened this issue Jul 25, 2023 · 9 comments
Assignees
Labels
archived This issue has been locked. compute question Further information is requested

Comments

@multivoltage
Copy link

Before opening, please confirm:

  • I have checked to see if my question is addressed in the FAQ.
  • I have searched for duplicate or closed issues.
  • I have read the guide for submitting bug reports.
  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.

App Id

d2skhgz4a0rx0t

AWS Region

eu-west-1

Amplify Hosting feature

Deployments, Frontend builds

Frontend framework

Next.js

Next.js version

12

Next.js router

Pages Router

Describe the bug

We migrated to next 12 with web-compute month ago. We had issue but since 2 month all work well.

Since today (25 july) in some page in my stack transation from server side are missing.
We noticed that after a deploy (of same build of last days).

We use next-i18next for transations. For pages with revalidate or pages using getServerSideProps options it seems that transations are missing.

Other pages witt getStaticProps and without revalide works. using next-i18-next require this code for pages:

export const getStaticProps: GetStaticProps = async () => {
    const locale: T_Locale = "it";

    return {
        props: {
            locale,
            ...(await serverSideTranslations("it", ["common"])),
        },
    };
};

Expected behavior

1- Translations are available in all pages.
2. I can see a log with error

Reproduction steps

Init a next 12 with pages directory app
install next-i18-next.

Create a page with revalidate.

This happend only on amplify

Build Settings

No response

Log output

# Put your logs below this line


Additional information

No response

@ferdingler
Copy link
Contributor

Hi @multivoltage, I'm not very familiar with the next-i18-next library. Where do you put your translation json files? Are they located in the public folder?

@victorccccc
Copy link
Contributor

Hi, I cannot reproduce your issue by setting revalidate or using getServerSideProps. This is my test app: https://main.d1rhug8t3v6e4r.amplifyapp.com and

I'm using example app from next-i18-next: https://github.com/Victorccding/simple-i18n-next

Can you help me to reproduce the issue? Thanks

@Jay2113 Jay2113 added question Further information is requested compute response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed pending-triage labels Jul 26, 2023
@multivoltage
Copy link
Author

@victorccccc thanks.
I fixed setting localPath to path resolve(something), like the docs write.
But I'm very confused since amplify change something and this fix become mandatory in my codebase.

Can you provide some info about a change?

@github-actions github-actions bot removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Jul 26, 2023
@shikixyx
Copy link

I was facing the same problem a few days ago, but setting up localePath in next-i18next.config.js solved the problem.

@multivoltage
Copy link
Author

Yes, but did you solve in a "random way" reading stackoverflow or you read some log in some point?

@shikixyx
Copy link

Yes, I found it in a "random way".

@Jay2113
Copy link
Contributor

Jay2113 commented Mar 1, 2024

Closing the thread since we were not able to reproduce this issue and based on the previous comments it seems to have been resolved.

@Jay2113 Jay2113 closed this as completed Mar 1, 2024
Copy link

github-actions bot commented Mar 1, 2024

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Copy link

github-actions bot commented Mar 1, 2024

This issue has been automatically locked.

@github-actions github-actions bot added the archived This issue has been locked. label Mar 1, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived This issue has been locked. compute question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants