Skip to content
This repository has been archived by the owner on Jun 10, 2024. It is now read-only.

Routing fails on production build #39

Closed
tsi opened this issue Nov 10, 2016 · 1 comment
Closed

Routing fails on production build #39

tsi opened this issue Nov 10, 2016 · 1 comment

Comments

@tsi
Copy link

tsi commented Nov 10, 2016

When running npm start and and navigating to, say, http://localhost:3000/some-page I get to the route I defined in routes.js or the default 404. that's good.
After building for production with npm run build and serving with npm run build:serve the main http://127.0.0.1:3003/ works but all other routes fail, giving browser 404 - This 127.0.0.1 page can’t be found.

Sorry if I'm missing something obvious.

@do87
Copy link

do87 commented Jan 25, 2018

the problem is with http-server. you'll have to find an alternative package such as spa-http-server that will enable you to direct all calls to index.html

@nicksp nicksp closed this as completed Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants