vercel / next.js

The React Framework
https://nextjs.org
MIT License
127.08k stars 27.01k forks source link

Refresh page on production while using link component #51863

Open Kunaljethva369 opened 1 year ago

Kunaljethva369 commented 1 year ago

Verify canary release

Provide environment information

Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Pro
    Binaries:
      Node: 18.15.0
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant packages:
      next: 13.4.7
      eslint-config-next: 13.4.7
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.1.3

warn  - Failed to fetch latest canary version. (Reason: fetch failed.)
      Detected "13.4.7". Visit https://github.com/vercel/next.js/releases.
      Make sure to try the latest canary version (eg.: `npm install next@canary`) to confirm the issue still exists before creating a new issue.    
      Read more - https://nextjs.org/docs/messages/opening-an-issue

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/Kunaljethva369/testnextlink

To Reproduce

https://spontaneous-pony-2b5855.netlify.app/

Describe the Bug

Have create a latest nextjs application, in which have made one navbar and use link component, it works fine on localhost build.

But when hosted on netlify it refresh the page. PFB the Production link and github repo link.

https://spontaneous-pony-2b5855.netlify.app/ https://github.com/Kunaljethva369/testnextlink

Expected Behavior

We should have expected no refresh of page when clicked on link, as we are using link component, but still it does work as expected.

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

netlify

Kunaljethva369 commented 1 year ago

Verify canary release

  • [x] 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 Pro
    Binaries:
      Node: 18.15.0
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant packages:
      next: 13.4.7
      eslint-config-next: 13.4.7
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 5.1.3

warn  - Failed to fetch latest canary version. (Reason: fetch failed.)
      Detected "13.4.7". Visit https://github.com/vercel/next.js/releases.
      Make sure to try the latest canary version (eg.: `npm install next@canary`) to confirm the issue still exists before creating a new issue.    
      Read more - https://nextjs.org/docs/messages/opening-an-issue

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/Kunaljethva369/testnextlink

To Reproduce

https://spontaneous-pony-2b5855.netlify.app/

Describe the Bug

Have create a latest nextjs application, in which have made one navbar and use link component, it works fine on localhost build.

But when hosted on netlify it refresh the page. PFB the Production link and github repo link.

https://spontaneous-pony-2b5855.netlify.app/ https://github.com/Kunaljethva369/testnextlink

Expected Behavior

We should have expected no refresh of page when clicked on link, as we are using link component, but still it does work as expected.

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

netlify

Now it working fine, as deployed on Vercel. the issue it with netlify's configuration.