Skip to content

Revalidate not working nextjs@13.4.12. Requires manual refresh #53600

@SharmaTushar1

Description

@SharmaTushar1

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Home Single Language
    Binaries:
      Node: 18.15.0
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant Packages:
      next: 13.4.12
      eslint-config-next: 13.4.12
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.1.6
    Next.js Config:
      output: N/A

Which area(s) of Next.js are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue or a replay of the bug

https://github.com/SharmaTushar1/nextjs-v-13.4.12-issue

To Reproduce

For nextjs@13.4.12 (no need to change it's in the the git repo)

  • Install dependencies npm install

  • Build the app npm run build

  • npm start

  • After the app is running try to move the file new.md from root directory to blogposts directory to check for revalidation

  • The revalidation is set to 10 (page.tsx of root/app). Wait for 10 secs and visit other posts.

  • The new.md post is not visible after 10 seconds. And is only visible after a manual refresh.

For next@13.2.4 (change in package.json)

npm install next@13.2.4

  • Now repeat the same steps as did previously

  • In this case the post from the file new.md is visible and revalidation works as expected.

Describe the Bug

The revalidate in next js for version 13.4.12 isn't working.

// Inside app/page.tsx
export const revalidate = 10; // should revalidate after 10 seconds 

When I try to create a new file (the app is built and running on port 3000) the new Post won't show up. I have to manually refresh the page to see the result.
This works completely fine and the post gets shown automatically without the need of refreshing for an older version of next js (13.2.4)

Expected Behavior

The app should be able to render the new.md blog without the need for a refresh. Just like how it is happening in nextjs@13.2.4. But, it requires a manual refresh.

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue was opened via the bug report template.lockedstaleThe issue has not seen recent activity.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions