Learn Tutorial behaves differently on local vs vercel.com
Unanswered
European anchovy posted this in #help-forum
European anchovyOP
I have been following the Learn NEXTJS 14 tutorial on their website. Part of the tutorial involves also the deployment onto Vercel. When testing the code on local (npm run dev) the skeletons appear when loading a page. However they don't appear in the live deployment https://nextjs-dashboard-nine-pi-66.vercel.app/dashboard when switching between pages (eg. Dashaboard -> Invoices). Any idea what this is happening, I was enjoying the tutorial.
Link to my code: https://github.com/manuelfrias/nextjs-dashboard
Link to my code: https://github.com/manuelfrias/nextjs-dashboard
16 Replies
@European anchovy I have been following the Learn NEXTJS 14 tutorial on their website. Part of the tutorial involves also the deployment onto Vercel. When testing the code on local (npm run dev) the skeletons appear when loading a page. However they don't appear in the live deployment https://nextjs-dashboard-nine-pi-66.vercel.app/dashboard when switching between pages (eg. Dashaboard -> Invoices). Any idea what this is happening, I was enjoying the tutorial.
Link to my code: https://github.com/manuelfrias/nextjs-dashboard
they did appear at first load but load instantly on next visit due to there is a 30 sec router cache. Also, prefetching is enable on production
try to wait for 30sec and navigate to it again
try to wait for 30sec and navigate to it again
European anchovyOP
No, after 30 seg they work when going through Invoices -> Dashboard. However they don't appear when changing between pages inside the Invoices.
it works
after 30 sec, you should see skeletons appear on every navigation
European anchovyOP
I really don't know now what is happening. I've try 2 different browsers, in normal and private modes with the same result.
@European anchovy I really don't know now what is happening. I've try 2 different browsers, in normal and private modes with the same result.
I don't see you have visited all page first
European anchovyOP
What do you mean?
@European anchovy What do you mean?
go to every page before waiting for 30 second
navigate with <Link />, don't type the address
@Ray go to every page before waiting for 30 second
European anchovyOP
It reponds differently on the same actions
@European anchovy It reponds differently on the same actions
the loading will be skipped when the route get prefetched
prefetching only enable on production
it should work the same on vercel or on your device
try
npm run build && npm run start to start the production mode on locally@Ray the loading will be skipped when the route get prefetched
European anchovyOP
Understood, however I know have 2 questions. Why the fake credentials work on dev mode locally but not on production. Also how do I remove the prefetch ?