prescottprue/generator-react-firebase

browserHistory not defined in ./src/containers/App/App.js line 10

CreativeBuilds opened this issue · 7 comments

On line 10 for ./src/containers/App/App.js after generation it's trying to use a variable called broswerHistory but it's not defined in the imports above that.

import React from 'react'
import PropTypes from 'prop-types'
import { BrowserRouter as Router } from 'react-router-dom'
import { MuiThemeProvider, createMuiTheme } from '@material-ui/core/styles'
import ThemeSettings from 'theme'

const theme = createMuiTheme(ThemeSettings)

const App = ({ routes }) => (
  <Router history={browserHistory}>{routes}</Router>
)

@CreativeBuilds Thanks for reporting, which version are you running? Could you provide the answers you used when generating so I can make sure I replicate correctly? It seems like you opted out of redux, but want to be sure.

I ended up swapping generators for now, I'll try again and provide the answers when I get chance, probably in the next hour or two.

I know I wasn't using redux though. So that could have been it. There was also an issue with the package.json not be fully written as there was a blank line with nothing on it, and a line with an extra comma that made the parser for npm install throw an error. I'll upload a copy of the json once it's done.

Okay settings are as followed
Include redux? No
Use firestore? Yes
Other Features, everything included
I didn't know what Sentry DSN was, so I left it blank
I chose Gitlab instead of travis
deploy to firebase

Public gist of my package.json directly after install https://gist.github.com/CreativeBuilds/7a80c4869397cc7aaeb242411b4eb275
line 51 is the empty line I was talking about
line 53 is the line with the extra ,

Yeah it seems to be because of opting out of redux (that flow seems to have had a few bugs added with the most recent major release).