I have this error with a React Native TypeScript Application on both Android and iOS.
TypeError : undefined is not an object (evaluating '_iterator[Symbol.iterator]')This error is located at: in Capture (at RootView.tsx:401) in SceneView (at NavigationCard.js:141) in RCTView (at View.js:45) in View (at createAnimatedComponent.js:151) in AnimatedComponent (at NavigationCard.js:135) in NavigationCard (at NavigationPointerEventsContainer.js:92) in Container (at NavigationCardStack.js:345) in RCTView (at View.js:45) in View (at NavigationCardStack.js:310) in RCTView (at View.js:45) in View (at NavigationCardStack.js:309) in RCTView (at View.js:45) in View (at NavigationTransitioner.js:232) in NavigationTransitioner (at NavigationCardStack.js:254) in NavigationCardStack (created by NavigatorImpl) in NavigatorImpl (at RootView.tsx:205) in RCTView (at View.js:45) in View (at createAnimatedComponent.js:151) in AnimatedComponent (at index.js:153) in RCTView (at View.js:45) in View (at index.js:247) in SideMenu (at RootView.tsx:200) in RCTView (at View.js:45) in View (created by View) in View (at RootView.tsx:194) in RootView (at App.tsx:165) in RCTView (at View.js:45) in View (created by View) in View (at App.tsx:156) in App (at src/index.tsx:20) in RCTView (at View.js:45) in View (created by RootViewUsingStore) in RCTView (at View.js:45) in View (at createAnimatedComponent.js:151) in AnimatedComponent (created by RootViewUsingStore) in RootViewUsingStore (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)bubbles Capture.tsx:808:4render Capture.tsx:350:54render ComponentBase.js:74:51_tryFinally AutoSubscriptions.js:163:22AutoSubscribeWrapper AutoSubscriptions.js:129:33finishClassComponent ReactNativeRenderer-dev.js:11581:21updateClassComponent ReactNativeRenderer-dev.js:11509:4performUnitOfWork ReactNativeRenderer-dev.js:17276:21workLoop ReactNativeRenderer-dev.js:17316:41renderRoot ReactNativeRenderer-dev.js:17417:15performWorkOnRoot ReactNativeRenderer-dev.js:18423:17performWork ReactNativeRenderer-dev.js:18324:24performSyncWork ReactNativeRenderer-dev.js:18285:14requestWork ReactNativeRenderer-dev.js:18169:19scheduleWork ReactNativeRenderer-dev.js:17969:16enqueueSetState ReactNativeRenderer-dev.js:6934:17<unknown> react.development.js:325:31<unknown> NavigatorExperimentalDelegate.js:90:29<unknown> Navigator.js:109:50<unknown> RootView.tsx:675:49saveData$ Settings.tsx:253:39tryCatch runtime.js:63:44invoke runtime.js:293:30tryCatch runtime.js:63:44invoke runtime.js:154:28<unknown> runtime.js:164:19tryCallOne core.js:37:14<unknown> core.js:123:25_callTimer JSTimers.js:152:14_callImmediatesPass JSTimers.js:200:17callImmediates JSTimers.js:473:30callImmediates [native code]:0__callImmediates MessageQueue.js:337:6<unknown> MessageQueue.js:135:6__guard MessageQueue.js:314:10flushedQueue MessageQueue.js:134:17flushedQueue [native code]:0invokeCallbackAndReturnFlushedQueue [native code]:0
My tsconfig.json:
{"compilerOptions": {"forceConsistentCasingInFileNames": true,"strictPropertyInitialization": true,"allowSyntheticDefaultImports": true,"experimentalDecorators": true,"noUnusedParameters": true,"noImplicitReturns": true,"moduleResolution": "node","strictNullChecks": true,"esModuleInterop": true,"noUnusedLocals": true,"noImplicitThis": true,"declarationDir": "dist-types","importHelpers": true,"noImplicitAny": true,"skipLibCheck": true,"declaration": true,"jsxFactory": "React.createElement","noResolve": false,"module": "es2015","target": "es2015","jsx": "react","lib": ["es5", "es2017", "dom"] },"include": ["src/**/*"],"exclude": ["node_modules"]}
My package.json:
"dependencies": { ..."react": "16.12.0","react-dom": "16.12.0","react-native": "0.59.10" ... },"devDependencies": { ..."metro-react-native-babel-preset": "0.65.2", ... }
I've already tried the solution found in the following links, with no luck:
https://github.com/facebook/react-native/issues/15902
Can't find variable Symbol using React Native with TypeScript
Any help appreciated.