#revalidatepath not working in vercel

64 messages · Page 1 of 1 (latest)

hollow larkBOT
#

🔎 This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

🕵️ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

✅ You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

safe bluff
#

hi, what do you mean only upper one works?

untold lake
safe bluff
untold lake
# safe bluff can you show the code of careers?
import React from "react";

import AvailableVacencies from "./AvailableVacencies";


import Vacancy from "@/models/Vacancy";
import connectDB from "@/utils/connectDB";

export const revalidate = 10;

const page = async () => {
  await connectDB();
  const data = await Vacancy.find();
  return (
    <>
      <AvailableVacencies data={data} />
    </>
  );
};

export default page;
safe bluff
#

do you get updated data in a refresh?

untold lake
#

In local it works as intended

#

But not in vercel

#

I guess not on build

untold lake
#

This is on localhost

#

This is on vercel

safe bluff
untold lake
#

gimme 5 mins

untold lake
#

And I am also getting this warning on the logs

safe bluff
#

there is a report after you run next build

#

can you show it?

untold lake
#

sure

untold lake
safe bluff
#

and the page get updated with next start on local too?

untold lake
#

wait I will show you

safe bluff
#

what version of next are you using?

untold lake
#

"next": "14.0.4",

#

Its i think 3 weeks old

safe bluff
#

hmm can you try deploying it to a new project on vercel?

untold lake
#

I will do it

untold lake
safe bluff
#

ah

#

is your project on github and is shareable?

untold lake
#

May i get your id I will add you

#

gimme a sec

#

Done

safe bluff
#

ok let me check

untold lake
safe bluff
#

ok

safe bluff
#

ok got it working

safe bluff
#

these are the change i made to fix those error

untold lake
#

Why did you wrapped that navbar and progressabr in suspense 🤔

untold lake
#

And when should I use dynamic Imports

untold lake
safe bluff
#

or when something is not visible at first render, you also can use it with ssr enable

untold lake
#

🤔

safe bluff
#

what do you mean?

untold lake
# safe bluff what do you mean?

I used to think that when I use "use client" it runs all the code even the children of that component would be rendered by the browser and when I use browser api then it would work

safe bluff
untold lake
#

And Thank you so much for helping me out ❤️

safe bluff
safe bluff
untold lake
#

could be removed

#

Thank you again ❤️

safe bluff
#

ok np