{"action":"created","issue":{"url":"https://api.github.com/repos/rafrex/spa-github-pages/issues/15","repository_url":"https://api.github.com/repos/rafrex/spa-github-pages","labels_url":"https://api.github.com/repos/rafrex/spa-github-pages/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/rafrex/spa-github-pages/issues/15/comments","events_url":"https://api.github.com/repos/rafrex/spa-github-pages/issues/15/events","html_url":"https://github.com/rafrex/spa-github-pages/issues/15","id":200728581,"number":15,"title":"Warning: [react-router] Location \"/repo-name/\" did not match any routes","user":{"login":"goldylucks","id":6963212,"avatar_url":"https://avatars.githubusercontent.com/u/6963212?v=3","gravatar_id":"","url":"https://api.github.com/users/goldylucks","html_url":"https://github.com/goldylucks","followers_url":"https://api.github.com/users/goldylucks/followers","following_url":"https://api.github.com/users/goldylucks/following{/other_user}","gists_url":"https://api.github.com/users/goldylucks/gists{/gist_id}","starred_url":"https://api.github.com/users/goldylucks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goldylucks/subscriptions","organizations_url":"https://api.github.com/users/goldylucks/orgs","repos_url":"https://api.github.com/users/goldylucks/repos","events_url":"https://api.github.com/users/goldylucks/events{/privacy}","received_events_url":"https://api.github.com/users/goldylucks/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-01-13T20:54:51Z","updated_at":"2017-01-13T22:00:25Z","closed_at":"2017-01-13T22:00:25Z","body":"Thanks a lot for this project!\r\nnow if I could only get it to work ;)\r\n\r\nI have a react SPA hosted on gh pages, and I have two repos for it:\r\n1. \"original\": Used for dev ([repo]((https://github.com/goldylucks/memory-n-back))) and hosting the production app on gh-pages\r\n2. \"staging\": used only for hosting the [staging app]((https://goldylucks.github.io/memory-n-back-staging/)) on [gh-pages branch](https://github.com/goldylucks/memory-n-back-staging/commit/aa9d9ba78a773f7f0cf4785bc59c1c9bed8633da)\r\n\r\nI've bundled and deployed [this commit](https://github.com/goldylucks/memory-n-back/commit/2f98462d34af8b898d7590244ece9e2dc7565cfd) from repo 1 to staging repo gh-branch.\r\n\r\ntho when I go to `https://goldylucks.github.io/memory-n-back-staging/` I get in the console `Warning: [react-router] Location \"/memory-n-back-staging/\" did not match any routes`\r\n\r\nI've copied the [404.html](https://github.com/goldylucks/memory-n-yoru sback-staging/blob/gh-pages/404.html) like u said, and tried setting [pathPrefix](https://github.com/goldylucks/memory-n-back-staging/blob/gh-pages/404.html#L24) to both false/true\r\n\r\nAlso I copy pasted the [script](https://github.com/goldylucks/memory-n-back-staging/blob/gh-pages/index.html#L11) to the `index.js` (before the call to the [spa bundle](https://github.com/goldylucks/memory-n-back-staging/blob/gh-pages/index.html#L45))\r\n\r\nIf it matters for any reason, I also have react-native and a nodejs a server code on that repo, tho to gh-pages only the react app and relevant assets are deployed\r\n\r\nThat's all the information I can think of that is relevant\r\n\r\nany ideas what I'm missing?\r\n\r\nThanks again for this project and sry if I'm missing something really dumb :hankey: "},"comment":{"url":"https://api.github.com/repos/rafrex/spa-github-pages/issues/comments/272559629","html_url":"https://github.com/rafrex/spa-github-pages/issues/15#issuecomment-272559629","issue_url":"https://api.github.com/repos/rafrex/spa-github-pages/issues/15","id":272559629,"user":{"login":"rafrex","id":11911299,"avatar_url":"https://avatars.githubusercontent.com/u/11911299?v=3","gravatar_id":"","url":"https://api.github.com/users/rafrex","html_url":"https://github.com/rafrex","followers_url":"https://api.github.com/users/rafrex/followers","following_url":"https://api.github.com/users/rafrex/following{/other_user}","gists_url":"https://api.github.com/users/rafrex/gists{/gist_id}","starred_url":"https://api.github.com/users/rafrex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafrex/subscriptions","organizations_url":"https://api.github.com/users/rafrex/orgs","repos_url":"https://api.github.com/users/rafrex/repos","events_url":"https://api.github.com/users/rafrex/events{/privacy}","received_events_url":"https://api.github.com/users/rafrex/received_events","type":"User","site_admin":false},"created_at":"2017-01-13T22:00:25Z","updated_at":"2017-01-13T22:00:25Z","body":"This is an issue with how you set up your routes. React Router works based on the full absolute path, so you need to add the repo-name prefix to your routes and links, for example:\r\n`<Route path=\"/memory-n-back-staging/about\" component={About} />`\r\n`<Link to=\"/memory-n-back-staging/about\">About</Link>`\r\n\r\nAlso, you should set `pathPrefix` to true for the redirect to work."}}
{"actor":{"display_login":"rafrex"}}