Skip to content

Commit 061d1e4

Browse files
Vicente Platagaearon
Vicente Plata
authored andcommitted
Add troubleshooting for Github Pages (#4197)
Add troubleshooting for an issue that has to do with either 2FA, or using Windows, or both, when trying to deploy an app via gh-pages
1 parent 9c3f03c commit 061d1e4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

packages/react-scripts/template/README.md

+10
Original file line numberDiff line numberDiff line change
@@ -2387,6 +2387,16 @@ GitHub Pages doesn’t support routers that use the HTML5 `pushState` history AP
23872387
* You could switch from using HTML5 history API to routing with hashes. If you use React Router, you can switch to `hashHistory` for this effect, but the URL will be longer and more verbose (for example, `http://user.github.io/todomvc/#/todos/42?_k=yknaj`). [Read more](https://reacttraining.com/react-router/web/api/Router) about different history implementations in React Router.
23882388
* Alternatively, you can use a trick to teach GitHub Pages to handle 404 by redirecting to your `index.html` page with a special redirect parameter. You would need to add a `404.html` file with the redirection code to the `build` folder before deploying your project, and you’ll need to add code handling the redirect parameter to `index.html`. You can find a detailed explanation of this technique [in this guide](https://github.com/rafrex/spa-github-pages).
23892389

2390+
#### Troubleshooting
2391+
2392+
##### "/dev/tty: No such a device or address"
2393+
2394+
If, when deploying, you get `/dev/tty: No such a device or address` or a similar error, try the follwing:
2395+
2396+
1. Create a new [Personal Access Token](https://github.com/settings/tokens)
2397+
2. `git remote set-url origin https://<user>:<token>@github.com/<user>/<repo>` .
2398+
3. Try `npm run deploy again`
2399+
23902400
### [Heroku](https://www.heroku.com/)
23912401

23922402
Use the [Heroku Buildpack for Create React App](https://github.com/mars/create-react-app-buildpack).<br>

0 commit comments

Comments
 (0)