Hot reload not working: [react-router] You cannot change <Router routes>
See original GitHub issueWhen editing a component from the demo HomePage, I get this message in the console:
Warning: [react-router] You cannot change <Router routes>; it will be ignored
And the hot reload doesn’t happen. This is the full log after saving the file:
2017-04-14 19:00:04.559 client.js?102b:199 [HMR] bundle rebuilding
2017-04-14 19:00:04.861 client.js?102b:207 [HMR] bundle rebuilt in 283ms
2017-04-14 19:00:04.862 process-update.js?e13e:27 [HMR] Checking for updates on the server...
2017-04-14 19:00:04.900 index.js?e6ba:81 [React Transform HMR] Patching Root
2017-04-14 19:00:04.901 process-update.js?e13e:100 [HMR] Updated modules:
2017-04-14 19:00:04.901 process-update.js?e13e:102 [HMR] - ./src/components/HomePage.js
2017-04-14 19:00:04.902 process-update.js?e13e:102 [HMR] - ./src/routes.js
2017-04-14 19:00:04.902 process-update.js?e13e:102 [HMR] - ./src/components/Root.js
2017-04-14 19:00:04.902 process-update.js?e13e:107 [HMR] App is up to date.
2017-04-14 19:00:04.903 browser.js?26d3:49 Warning: [react-router] You cannot change <Router routes>; it will be ignored
Node version: 7.8.0
npm version: 4.2.0
Operating system: macOS Sierra 10.12.4
Command line used:
npm run setup
, npm run start
Issue Analytics
- State:
- Created 6 years ago
- Comments:6
Top Results From Across the Web
Hot reload works only at layout [Warning: You cannot change ...
I get an error when I try to change other file except layout. When I change Layout file everything is OK, nut if...
Read more >React router hot-reload not working - Stack Overflow
my problem was solved by adding historyApiFallback: true in webpack.config devServer section and <base href="/"> in the head
Read more >connected-react-router - npm
Start using connected-react-router in your project by running `npm i ... hot reloading while preserving state (with react-hot-reload).
Read more >Fixing the 'cannot GET /URL' error on refresh with React ...
The first, set up both client and server side routing. The second, redirect all server requests to /index.html which will download all the...
Read more >gaearon/react-hot-loader - Gitter
We 're having issues with getting RHL (v4) and react-router (v4) to play nicely ... Hot-reloading works great, until a route change is...
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 FreeTop 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
Top GitHub Comments
Here is temporary solution, if anyone needs this to be fixed right away:
Closing as the issue seems to be a React router issue.