user11816068
user11816068

Reputation:

razzle SSR rendering react, doesn't run from initial installation instructions

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

Upvotes: 0

Views: 447

Answers (1)

anz
anz

Reputation: 1042

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

Upvotes: 1

Related Questions