0

running the basic install for razzle, I get the error "Cannot GET /", this is what I did:

https://github.com/jaredpalmer/razzle

npx create-razzle-app my-app cd my-app npm start

marcsqna09
  • 117
  • 1
  • 2
  • 9

1 Answers1

1

For people stumbling on this:

in template need change in client.js

 import BrowserRouter from 'react-router-dom/BrowserRouter';

to

 import {BrowserRouter}  from 'react-router-dom';

and in App.js

import Route from 'react-router-dom/Route';
import Switch from 'react-router-dom/Switch';

to

import {Route,Switch} from 'react-router-dom';

Source : https://github.com/jaredpalmer/razzle/issues/1022

anz
  • 987
  • 7
  • 21