React-native-tab-view: [v3][Android/iOS] Unable to resolve module ./TouchableItem

Created on 15 Mar 2021  路  13Comments  路  Source: satya164/react-native-tab-view

I'm using the following package versions:

  • react-native 0.64.0
  • react-native-tab-view 3.0.0
  • react-native-pager-view 5.1.2
Error: Unable to resolve module ./TouchableItem from C:\nodejs\mahle-one-app\node_modules\react-native-tab-view\lib\module\index.js:

None of these files exist:
  * node_modules\react-native-tab-view\lib\module\TouchableItem(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.svg|.native.svg|.svg)
  * node_modules\react-native-tab-view\lib\module\TouchableItem\index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx|.android.svg|.native.svg|.svg)
> 1 | export { default as TabBar } from './TabBar';
  2 | export { default as TabView } from './TabView';
  3 | export { default as TabBarIndicator } from './TabBarIndicator';
  4 | export { default as TabBarItem } from './TabBarItem';
    at ModuleResolver.resolveDependency (C:\nodejs\mahle-one-app\node_modules\metro\src\node-haste\DependencyGraph\ModuleResolution.js:211:15)
    at DependencyGraph.resolveDependency (C:\nodejs\mahle-one-app\node_modules\metro\src\node-haste\DependencyGraph.js:413:43)
    at Object.resolve (C:\nodejs\mahle-one-app\node_modules\metro\src\lib\transformHelpers.js:317:42)
    at resolve (C:\nodejs\mahle-one-app\node_modules\metro\src\DeltaBundler\traverseDependencies.js:629:33)
    at C:\nodejs\mahle-one-app\node_modules\metro\src\DeltaBundler\traverseDependencies.js:645:26
    at Array.reduce (<anonymous>)
    at resolveDependencies (C:\nodejs\mahle-one-app\node_modules\metro\src\DeltaBundler\traverseDependencies.js:644:33)
    at C:\nodejs\mahle-one-app\node_modules\metro\src\DeltaBundler\traverseDependencies.js:329:33
    at Generator.next (<anonymous>)
    at asyncGeneratorStep (C:\nodejs\mahle-one-app\node_modules\metro\src\DeltaBundler\traverseDependencies.js:137:24)

Most helpful comment

There's no file in the library which imports TouchableItem. If you have issues, it's due to cache. So you need to clear your cache if you have the issue: https://reactnavigation.org/docs/troubleshooting/#im-getting-an-error-unable-to-resolve-module-after-updating-to-the-latest-version

All 13 comments

Couldn't find version numbers for the following packages in the issue:

  • react-native
  • react-native-tab-view
  • react-native-pager-view

Can you update the issue to include version numbers for those packages? The version numbers must match the format 1.2.3.

TouchableItem has been replaced with PlatformPressable, as far as I see it.

Thank you, after re-install the module it works fine.

@rapomon I have the same issue and can not fix it. How you have fixed?

Uninstall the module, and install again, this should work.

I have tried, but again the same, ok, thank :(

Maybe you can try to remove node_modules and do a clean install.
Also you can do this from the root project folder:
cd android && gradlew clean

android works well, the problem in iosm I have removed all then install again, same.

Ok, sorry but I only use Android for my app.

ok, thanks.

thanks for renaiming

Openning again the issue so in iOS currently there is not a solution.

There's no file in the library which imports TouchableItem. If you have issues, it's due to cache. So you need to clear your cache if you have the issue: https://reactnavigation.org/docs/troubleshooting/#im-getting-an-error-unable-to-resolve-module-after-updating-to-the-latest-version

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hyochan35 picture hyochan35  路  3Comments

itzsaga picture itzsaga  路  3Comments

AndriiUhryn picture AndriiUhryn  路  3Comments

QuentinBrosse picture QuentinBrosse  路  4Comments

KingAmo picture KingAmo  路  3Comments