Skip to content
This repository has been archived by the owner on Sep 11, 2018. It is now read-only.

Invariant violation in production mode #19

Closed
jonaswindey opened this issue Aug 16, 2015 · 1 comment
Closed

Invariant violation in production mode #19

jonaswindey opened this issue Aug 16, 2015 · 1 comment
Labels

Comments

@jonaswindey
Copy link

NODE_ENV=production npm run compile
npm run server:start

Gives the following error(s)

Error: Invariant Violation: Server-side <Router>s need location, branch, params, and components props. Try using Router.run to get all the props you need

I suppose it is related to remix-run/react-router#1455

@dvdzkwsk dvdzkwsk added the bug label Aug 16, 2015
@dvdzkwsk
Copy link
Owner

Hey, thanks for catching this... my browser had been caching my favicon so I never encountered it. I just added a fix b599fa8 so the server should no longer choke if react-router returns an undefined initialState.

Adding a favicon also would have fixed this (and I will do that soon as well) but this should be a more robust solution in case any other invalid routes get passed through to the router.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants