Deployment to Github Pages issue: Cannot match any routes
See original GitHub issueVersions
Angular CLI: 1.5.5
Node: 8.9.4
OS: win32 x64
Angular: 5.0.0
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router
@angular/cli: 1.5.5
@angular-devkit/build-optimizer: 0.0.34
@angular-devkit/core: 0.0.22
@angular-devkit/schematics: 0.0.38
@ngtools/json-schema: 1.1.0
@ngtools/webpack: 1.8.5
@schematics/angular: 0.1.8
typescript: 2.4.2
webpack: 3.8.1
Error: Uncaught (in promise): Error: Cannot match any routes
I’m trying to deploy my Angular SPA app to github pages using this [/angular-cli/wiki](https://github.com/angular/angular-cli/wiki/stories-github-pages .)
I run this command ng build --prod --output-path docs --base-href learningangular
it reroutes my app from https://alamgirqazi.github.io/learningangular to https://alamgirqazi.github.io/learningangular/learningangular/
and I get the above error. I’ve added more detail here https://stackoverflow.com/questions/48436223/angular-cli-deploy-to-github-pages-issue-error-error-uncaught-in-promise-er#
Here’s the link to the app: https://alamgirqazi.github.io/learningangular
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Angular CLI Deploy to Github Pages issue: ERROR Error ...
Angular CLI Deploy to Github Pages issue: ERROR Error: Uncaught (in promise): Error: Cannot match any routes · Subscribe to RSS.
Read more >Using React Router on GitHub Pages - Medium
A guide to making sure your routes work once deployed and support direct URL navigation and a hard refresh. This guide assumes an...
Read more >Deploying to Github Pages? Don't Forget to Fix Your Links
Is your site not working after deploying to Github Pages? Learn the #1 reason why deployments to Github Pages fail and how to...
Read more >Problem with react-router app and Github Pages (Solved !)
The solution is to change our path of the route in our app: import './App.css'; import {BrowserRouter as Router,Switch,Route} from 'react-router ...
Read more >Working with routes for HTTP APIs - Amazon API Gateway
The $default route. If no routes match a request, API Gateway returns {"message":"Not Found"} to the ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It’s better to change the documentation(https://github.com/angular/angular-cli/wiki/stories-github-pages), from
to
in my case it works with leading/trailing slash in the base-href
→