iamshaunjp/React-Redux-Firebase-App

TypeError: Cannot read Undefined property'sdk_version' what is the solution to his mistake?

kraljesus opened this issue · 0 comments

TypeError: Object ( ... ) is not a function. I was taking his mistake. reaction-Redux-Firebase 2.2.4 version I was told to drop, I did but gives error.web browser new mistake:

TypeError: Cannot read property 'SDK_VERSION' of undefined.what do you think the solution is?you help me?

package.json

{
  "name": "marioplan",
  "version": "0.1.0",
  "private": true,
  "dependencies": {
    "@testing-library/jest-dom": "^4.2.4",
    "@testing-library/react": "^9.3.2",
    "@testing-library/user-event": "^7.1.2",
    "firebase": "^7.8.2",
    "react": "^16.12.0",
    "react-dom": "^16.12.0",
    "react-redux": "^7.1.3",
    "react-redux-firebase": "^2.2.4",
    "react-router-dom": "^5.1.2",
    "react-scripts": "3.4.0",
    "redux": "^4.0.5",
    "redux-firestore": "^0.12.0",
    "redux-thunk": "^2.3.0"
  },
  "scripts": {
    "start": "react-scripts start",
    "build": "react-scripts build",
    "test": "react-scripts test",
    "eject": "react-scripts eject"
  },
  "eslintConfig": {
    "extends": "react-app"
  },
  "browserslist": {
    "production": [
      ">0.2%",
      "not dead",
      "not op_mini all"
    ],
    "development": [
      "last 1 chrome version",
      "last 1 firefox version",
      "last 1 safari version"
    ]
  },
  "devDependencies": {
    "eslint-plugin-react": "^7.18.3"
  }
}

index.js

/* eslint-disable no-unused-vars */
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';

import {createStore, applyMiddleware,compose} from 'redux';
import rootReducer from './store/rootReducer';
import {Provider} from 'react-redux'
import thunk from 'redux-thunk'
import {getFirestore,reduxFirestore } from 'redux-firestore'
import {getFirebase,reactReduxFirebase} from 'react-redux-firebase'
import fbConfig from './config/fbConfig'

const store=createStore(rootReducer, 
    compose(
    applyMiddleware(thunk.withExtraArgument({getFirebase,getFirestore})),
    reduxFirestore(),
    reactReduxFirebase()
    )
    );

ReactDOM.render(<Provider store ={store}></Provider>><App />, document.getElementById('root'));