Closed qtcoder999 closed 5 years ago
Can you try installing version 3.0.8?
Hi @Ashoat I'm having the same issue, then installed version 3.0.8 but getting this error now.
Error: This navigator has both navigation and container props, so it is unclear if it should own its own state. Remove props: "theme" if the navigator should get its state from the navigation prop. If the navigator should maintain its own state, do not pass a navigation prop.
This error is located at:
in NavigationContainer (at create-redux-container.js:92)
in NavigatorReduxWrapper (at App.js:146)
in Navigator (created by ConnectFunction)
in ConnectFunction (at oneheart/index.js:24)
in ThemeProvider (at Provider.tsx:21)
in RCTView (at View.js:45)
in View (at PortalHost.tsx:128)
in Portal.Host (at Provider.tsx:17)
in Provider (at oneheart/index.js:23)
in Provider (at oneheart/index.js:22)
in Main (at renderApplication.js:35)
in RCTView (at View.js:45)
in View (at AppContainer.js:98)
in RCTView (at View.js:45)
in View (at AppContainer.js:115)
in AppContainer (at renderApplication.js:34)
validateProps
createAppContainer.js:43:10
new NavigationContainer
createAppContainer.js:101:6
constructClassInstance
ReactNativeRenderer-dev.js:7324:17
updateClassComponent
ReactNativeRenderer-dev.js:11478:4
beginWork
ReactNativeRenderer-dev.js:12874:13
performUnitOfWork
ReactNativeRenderer-dev.js:17276:11
workLoop
ReactNativeRenderer-dev.js:17316:23
renderRoot
ReactNativeRenderer-dev.js:17417:6
performWorkOnRoot
ReactNativeRenderer-dev.js:18423:6
performWork
ReactNativeRenderer-dev.js:18324:6
I think you're trying to pass a container to createReduxContainer
instead of passing a navigator, which isn't correct. If you really want to keep doing that, you can either update to react-navigation@4
or downgrade to react-navigation-redux-helpers@3.0.3
ExceptionsManager.js:82 Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
ExceptionsManager.js:82 Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
package.json
{ "name": "abcd", "version": "0.0.1", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli/cli.js start", "test": "jest", "clean": "rm -rf $TMPDIR/react- && watchman watch-del-all && npm cache clean --force", "clean:android": "cd android/ && ./gradlew clean && cd .. && react-native run-android", "newclear": "rm -rf $TMPDIR/react- && watchman watch-del-all && rm -rf ios/build && rm -rf node_modules/ && npm cache clean --force && npm i", "test:watch": "jest --watch", "updateSnapshot": "jest --updateSnapshot", "coverage": "jest --coverage && open coverage/lcov-report/index.html || xdg-open coverage/lcov-report/index.html", "android:build": "cd android && ./gradlew assembleRelease", "android:install": "cd android && ./gradlew assembleRelease && ./gradlew installRelease", "android:hockeyapp": "cd android && ./gradlew assembleRelease && puck -submit=auto app/build/outputs/apk/app-release.apk", "android:devices": "$ANDROID_HOME/platform-tools/adb devices", "android:logcat": "$ANDROID_HOME/platform-tools/adb logcat *:S ReactNative:V ReactNativeJS:V", "android:shake": "$ANDROID_HOME/platform-tools/adb devices | grep '\t' | awk '{print $1}' | sed 's/\s//g' | xargs -I {} $ANDROID_HOME/platform-tools/adb -s {} shell input keyevent 82", "storybook": "storybook start -p 7007", "lint": "standard --verbose | snazzy", "lintdiff": "git diff --name-only --cached --relative | grep '\.js$' | xargs standard | snazzy", "fixcode": "standard --fix", "git-hook": "npm run lint -s && npm run test -s", "build:ios": "react-native bundle --entry-file='index.js' --bundle-output='./ios/main.jsbundle' --dev=false --platform='ios'", "postinstall": "scripts/install.js" }, "dependencies": { "@react-native-community/geolocation": "^2.0.2", "apisauce": "^1.0.2", "format-json": "^1.0.3", "identity-obj-proxy": "^3.0.0", "jetifier": "^1.6.4", "lodash": "^4.17.11", "prop-types": "^15.7.2", "querystringify": "2.1.0", "ramda": "^0.26.1", "react": "16.8.3", "react-native": "0.59.9", "react-native-animatable": "^1.3.2", "react-native-communications": "^2.2.1", "react-native-config": "^0.11.7", "react-native-device-info": "^1.6.1", "react-native-dropdown": "git+https://github.com/g6ling/react-native-dropdown.git", "react-native-gesture-handler": "1.3.0", "react-native-material-dropdown": "git+https://github.com/harshitjee/react-native-material-dropdown.git", "react-native-multiple-select": "^0.4.4", "react-native-popover": "git+https://github.com/jeanregisser/react-native-popover.git", "react-native-popover-tooltip": "^1.1.4", "react-native-popup-menu": "^0.14.0", "react-native-simple-popover": "^2.1.0", "react-native-simple-toast": "0.0.8", "react-native-splash-screen": "^3.0.6", "react-navigation": "^3.11.1", "react-navigation-redux-helpers": "^3.0.2", "react-redux": "^6.0.0", "react-timer-mixin": "^0.13.4", "redux": "^4.0.0", "redux-persist": "^5.10.0", "redux-saga": "^1.0.0", "reduxsauce": "1.0.1", "seamless-immutable": "^7.1.4" }, "devDependencies": { "@babel/core": "^7.5.5", "@babel/runtime": "^7.5.5", "@storybook/addon-actions": "5.0.11", "@storybook/addon-links": "5.0.11", "@storybook/addon-storyshots": "^4.1.11", "@storybook/addons": "^4.1.11", "@storybook/channels": "^4.1.11", "@storybook/react-native": "^4.1.11", "babel-core": "6.26.3", "babel-eslint": "^10.0.3", "babel-jest": "^24.9.0", "babel-plugin-ignite-ignore-reactotron": "^0.3.0", "babel-preset-airbnb": "^4.1.0", "babel-preset-env": "^1.6.1", "babel-preset-react-native": "^4.0.1", "enzyme": "^3.2.0", "enzyme-adapter-react-16": "^1.1.0", "eslint": "^6.5.1", "eslint-config-airbnb": "^18.0.1", "eslint-config-prettier": "^6.3.0", "eslint-plugin-import": "^2.18.2", "eslint-plugin-jsx-a11y": "^6.2.3", "eslint-plugin-prettier": "^3.1.1", "eslint-plugin-react": "^7.15.1", "eslint-plugin-react-native": "^3.7.0", "eslint-watch": "^6.0.1", "husky": "^0.14.3", "ignite-andross": "^4.1.0", "ignite-animatable": "1.0.2", "ignite-dev-screens": "2.4.5", "ignite-ir-boilerplate-andross": "^2.3.3", "ignite-redux-persist": "1.1.2", "ignite-standard": "1.0.0", "jest": "^24.9.0", "metro-react-native-babel-preset": "^0.56.0", "mockery": "^2.1.0", "pre-commit": "^1.2.2", "prettier": "^1.18.2", "prettier-eslint": "^9.0.0", "react-devtools-core": "3.6.0", "react-dom": "16.7.0", "react-test-renderer": "16.8.3", "reactotron-react-native": "^2.1.0", "reactotron-redux": "^2.1.0", "reactotron-redux-saga": "^3.0.0", "remote-redux-devtools": "^0.5.16", "snazzy": "^8.0.0", "standard": "10.0.2" }, "jest": { "testMatch": [ "/Tests/*/.js",
"*/?(.)(spec|test).js?(x)"
],
"testPathIgnorePatterns": [
"/node_modules/",
"/Tests/Setup.js"
],
"moduleNameMapper": {
"^.+\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "identity-obj-proxy"
},
"setupFiles": [
"/Tests/Setup"
],
"preset": "react-native"
},
"config": {},
"standard": {
"parser": "babel-eslint",
"globals": [
"describe",
"test",
"jest",
"expect",
"fetch",
"navigator",
"DEV",
"XMLHttpRequest",
"FormData",
"React$Element"
]
}
}
This issue is similar to https://github.com/infinitered/ignite-andross/issues/291. Please read this issue also.
I have also tried changing the redux-navigation and helpers version to the following.
with no luck.
For further reference: Check this PR : https://github.com/react-navigation/redux-helpers/pull/100