Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

links are broken in dev mode in the with-zones example #14242

Closed
bionicles opened this issue Jun 16, 2020 · 3 comments · Fixed by #14480
Closed

links are broken in dev mode in the with-zones example #14242

bionicles opened this issue Jun 16, 2020 · 3 comments · Fixed by #14480
Assignees
Labels
examples Issue was opened via the examples template.
Milestone

Comments

@bionicles
Copy link

Bug report

Describe the bug

if you straight up clone /examples/with-zones, 'yarn dev' doesn't work in the root directory, so you have to run yarn dev in each zone independently, and then the cross-zone links break

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. yarn create next-app --example with-zones
  2. cd $APPNAME
  3. yarn && yarn dev fails
  4. cd blog && yarn && yarn dev
  5. open a new terminal
  6. cd path/to/$APPNAME/home && yarn && yarn dev
  7. visit localhost:3000 in the browser
  8. click the 'blog' link -- it doesn't work because the blog lives on port 4000
  9. visit localhost:4000 -- it doesn't work because the blog lives at /blog page

Expected behavior

I expected the 'with zones' example to work like other examples, in that i could just cd into it and run yarn && yarn dev and it would work locally

System information

  • OS: ubuntu 18.04
  • Browser: chrome
  • Version of Next.js: 9.2.1
  • Version of Node.js: 14.4.0

Additional context

Thought this could help solve my issue of global styles screwing up my 3d game but unfortunately the local development is a bit wonky. It probably works if deployed, but then we gotta deploy our app for each change locally, just to get cross-zone linking to work.

A much better solution for my use-case would be per-page global styles

@bionicles
Copy link
Author

thanks for making nextjs guys! you're the best

@Timer Timer added good first issue Easy to fix issues, good for newcomers examples Issue was opened via the examples template. labels Jun 16, 2020
@Timer Timer added kind: story and removed good first issue Easy to fix issues, good for newcomers labels Jun 16, 2020
@khattakdev
Copy link
Contributor

khattakdev commented Jun 17, 2020

@lfades , I can write a fix for this

@Timer Timer added this to the iteration 3 milestone Jun 17, 2020
@kodiakhq kodiakhq bot closed this as completed in #14480 Jun 23, 2020
kodiakhq bot pushed a commit that referenced this issue Jun 23, 2020
[ch3480]

Fixes #14242
Closes #14264

Updated the readme of the `with-zones` example to use `vercel dev` instead, starting the app independently has some routing issues that don't happen on production (due to `vercel.json`), with `vercel dev` the app will match the production deployment on localhost.
rokinsky pushed a commit to rokinsky/next.js that referenced this issue Jul 11, 2020
[ch3480]

Fixes vercel#14242
Closes vercel#14264

Updated the readme of the `with-zones` example to use `vercel dev` instead, starting the app independently has some routing issues that don't happen on production (due to `vercel.json`), with `vercel dev` the app will match the production deployment on localhost.
@balazsorban44
Copy link
Member

This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
examples Issue was opened via the examples template.
Projects
None yet
5 participants