question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Navigation via url/refresh/link other than sidenav does not work in production mode.

See original GitHub issue

Bug Report

When the project has been built for production using yarn docz build navigation only works through the side bar. When trying to link between pages using markdown links, or refreshing the page, the site 404’s.

To Reproduce Here is what I used to test - First I load the typography page successfully by using the sidebar nav, it loads successfully. Next I try to refresh the page and it 404’s. Then I navigate to the colors page and it loads successfully. Next I try to refresh the page and it 404`s.

[Wed Jul 18 2018 14:29:58 GMT+0100 (BST)] "GET /static/js/docs-1-brand-2-typography.js" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
[Wed Jul 18 2018 14:30:04 GMT+0100 (BST)] "GET /brand/typography" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
[Wed Jul 18 2018 14:30:04 GMT+0100 (BST)] "GET /brand/typography" Error (404): "Not found"
[Wed Jul 18 2018 14:30:31 GMT+0100 (BST)] "GET /brand/colors" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36"
[Wed Jul 18 2018 14:30:31 GMT+0100 (BST)] "GET /brand/colors" Error (404): "Not found"

Expected behavior That the routes are served so they can be accessed from anywhere, not just from the sidebar navigation.

Enviroment

  • OS: OSX 10.13.4
  • Node/npm version: Node 9, NPM 5
  • Docz Version: 0.5.9

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
rupificationcommented, Apr 12, 2019

@pedronauck i think this might still exist in prod mode.

hosting the dist using http-server and hitting abc.com/getting-started will return 404. hitting abc.com without the path works though.

im using v1 rc7

1reaction
Swapnullcommented, Jul 19, 2018

Switching from using Markdown links to <Link> fixes the issue. I have also applied the same netlify.toml from the docz site to do the index.html redirect and that sorts out the refresh 😃 Not sure that is really a solution, but it works for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Open/Close sidenav from another component - Stack Overflow
I had the same problem using. I resolved it like this. SidenavService import { Injectable } from '@angular/core'; import { MatSidenav } from...
Read more >
Sidenav - Angular Material
The sidenav components are designed to add side content to a fullscreen app. ... sidenav modes show a backdrop by default, while the...
Read more >
Fix sidenav on large screens not working - MDBootstrap
I am trying to setup my site exactly like the layout DOUBLE NAVIGATION WITH FIXED SIDENAV & FIXED NAVBAR. But no matter what...
Read more >
Angular Material Tutorial - 11 - Sidenav - YouTube
Your browser can 't play this video. Learn more. Switch camera ... Business - codevolution.business@gmail.com Sidenav in Angular Material ...
Read more >
Angular 6 Material SideNav Example - DevGlan
This article is about creating Sidenav component using Angular Material 6 with routing along with mat toolbar.The different routes will be ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found