shopify-app-template-node icon indicating copy to clipboard operation
shopify-app-template-node copied to clipboard

Following links always triggers full page refresh (non-embedded)

Open jsjexpert opened this issue 5 years ago • 2 comments

Issue summary

Write a short description of the issue here ↓ When using this build for non-embedded apps, all urls trigger a full page refresh.

Expected behavior

What do you think should happen? Expecting NextJS routing to dynamically load components using in-built /pages routing syste,

Actual behavior

What actually happens? Following an internal link triggers a full-page refresh. I've also tried passing a custom linkComponent to AppProvider but refresh behavior doesn't change (or triggers a whole new suite of errors if trying to use a different router on top of the build)

Tip: include an error message (in a <details></details> tag) if your issue is related to an error

Steps to reproduce the problem

Create a new shopify-app-node app (using shopify-app-cli) Configure app in partner dash as non-embedded Remove <Provider> components, leaving the rest intact Create 2 new pages using shopify generate (foo1, foo2) In foo1, add import { Link } from "@shopify/polaris";

Foo 2

shopify serve Install the app, authorize then navigate to ngrok_address/foo1 directly Follow the link to /foo2

Full-page refresh will occur

Reduced test case

The best way to get your bug fixed is to provide a reduced test case.

Specifications

  • Browser: Google Chrome Version 81.0.4044.122 (Official Build) (64-bit)
  • Device: PC
  • Operating System: Win10 Pro 10.0.19041 WSL2 Ubuntu 18.04

jsjexpert avatar Apr 26 '20 15:04 jsjexpert

I'm at my wits end on this one. I've tried so many different approaches to resolve this without any success. On top of all the above, dynamic links such as /products/123 with a /pages/products/[pid].js file return an error. I'm about to rip our next js completely and start over unless you have some magic for me!

jsjexpert avatar Apr 26 '20 15:04 jsjexpert

Same problems here

Renyqin avatar Jun 08 '21 01:06 Renyqin

This issue is stale because it has been open for 60 days with no activity. It will be closed if no further action occurs in 14 days.

github-actions[bot] avatar Oct 07 '22 02:10 github-actions[bot]

We are closing this issue because it has been inactive for a few months. This probably means that it is not reproducible or it has been fixed in a newer version. If it’s an enhancement and hasn’t been taken on since it was submitted, then it seems other issues have taken priority.

If you still encounter this issue with the latest stable version, please reopen using the issue template. You can also contribute directly by submitting a pull request– see the CONTRIBUTING.md file for guidelines

Thank you!

github-actions[bot] avatar Oct 22 '22 02:10 github-actions[bot]