inspmoore / papu

Universal e-commerce food ordering. Shared code between web and native platforms.
60 stars 16 forks source link

TypeError: Cannot read property 'injection' of undefined #1

Open shravanteegala opened 5 years ago

shravanteegala commented 5 years ago

I am getting this error.

TypeError: Cannot read property 'injection' of undefined ./node_modules/react-native-web/dist/exports/createElement/index.js node_modules/react-native-web/dist/exports/createElement/index.js:20

MuhammadUzair commented 5 years ago

Fixed this issue by update react-native-web version 0.8.5 to 0.9.3 in Package.json and npm i or yarn install. After this I face redux issue and fixed redux issue by update store.js. Updated store.js code :

import { createStore, applyMiddleware ,compose } from 'redux' import reducer from '../reducers' import createSagaMiddleware from 'redux-saga' import root from '../sagas/index'

const sagaMiddleware = createSagaMiddleware() const middleware = applyMiddleware(sagaMiddleware)

const composeEnhancer = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; const store = createStore( reducer, composeEnhancer(middleware),

)

sagaMiddleware.run(root)

export default store

window.store = store