Issue with ISR using App Router
Answered
Southern African anchovy posted this in #help-forum
![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Southern African anchovyOP
Hi all, i'm having a play with the new app router atm. I've used NextJS on a previous project using the page router. I'm having some issues with ISR on the new app router. Building the app locally for production and running I can see the time here never updates. I'm probably misunderstanding something, how do we invalidate a server component here?
import Link from 'next/link'
interface User {
id: number
name: string
}
export const revalidate = 10
export default async function UsersPage() {
const response = await fetch('https://jsonplaceholder.typicode.com/users', {
//cache: 'no-store',
next: {
revalidate: 10,
},
})
const users: User[] = await response.json()
return (
<main>
<h1 className={'text-xl'}>Users</h1>
<p>{new Date().toLocaleTimeString()}</p>
<ul>
{users.map((user) => (
<li key={user.id}>{user.name}</li>
))}
</ul>
<br />
<Link className={'text-xl'} href={'/'}>
Home
</Link>
</main>
)
}
22 Replies
![Avatar](https://cdn.discordapp.com/avatars/484037068239142956/44415017de6fed2ccd5d44b4b2051ac0.webp?size=256)
joulev
Weird… can you try a lower version?
Answer
![Avatar](https://cdn.discordapp.com/avatars/484037068239142956/44415017de6fed2ccd5d44b4b2051ac0.webp?size=256)
joulev
Like 13.4.19
Then 13.4.18 and so on
A few hours ago a user also asked me this exact same issue
![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Southern African anchovyOP
it's
"next": "13.5.2",
![Avatar](https://cdn.discordapp.com/avatars/194128415954173952/708a8637ada505b6b7a85972807d9dca.webp?size=256)
Alfonsus Ardani
have you tried refreshing twice after the 10th second
![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Southern African anchovyOP
yes
Are you on windows
![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Southern African anchovyOP
yeah windows 11
![Avatar](https://cdn.discordapp.com/avatars/484037068239142956/44415017de6fed2ccd5d44b4b2051ac0.webp?size=256)
joulev
Ok this smells like a windows-specific bug here cc @Florian
Try deploying on vercel (linux), does this bug occur?
![Avatar](https://cdn.discordapp.com/avatars/194128415954173952/708a8637ada505b6b7a85972807d9dca.webp?size=256)
Alfonsus Ardani
This wont help but It should work on 13.4.19 as ive been playing with revalidate a lot in windows
![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Southern African anchovyOP
thought i'd try wsl quickly, same issue. let me grab my macbook ...
![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Southern African anchovyOP
same issue on the mac
@joulev works on
"next": "13.4.19",
I can see it updating now every 10 seconds. Thanks @Alfonsus Ardani![Avatar](https://cdn.discordapp.com/avatars/484037068239142956/44415017de6fed2ccd5d44b4b2051ac0.webp?size=256)
joulev
You should open a bug report
![Avatar](https://cdn.discordapp.com/embed/avatars/1.png)
Southern African anchovyOP
Thanks, yeah I was just looking on there to see if it's already been raised
![Avatar](https://cdn.discordapp.com/avatars/495665932400853003/3298c7307ad5fc1712015d08eb627fe2.webp?size=256)
Florian
That's weird
If you are on Chrome, can you try it on Firefox with the latest
next
version? that worked for me 😆![Avatar](https://cdn.discordapp.com/avatars/194128415954173952/708a8637ada505b6b7a85972807d9dca.webp?size=256)
Alfonsus Ardani
bonkers haha