satya164 / react-native-tab-view

A cross-platform Tab View component for React Native
MIT License
5.13k stars 1.07k forks source link

[v3][Android/iOS] Unable to resolve module ./TouchableItem #1150

Closed rapomon closed 3 years ago

rapomon commented 3 years ago

I'm using the following package versions:

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)
github-actions[bot] commented 3 years ago

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

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

TheWirv commented 3 years ago

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

rapomon commented 3 years ago

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

karo-dc commented 3 years ago

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

rapomon commented 3 years ago

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

karo-dc commented 3 years ago

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

rapomon commented 3 years ago

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

karo-dc commented 3 years ago

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

rapomon commented 3 years ago

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

karo-dc commented 3 years ago

ok, thanks.

karo-dc commented 3 years ago

thanks for renaiming

rapomon commented 3 years ago

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

satya164 commented 3 years ago

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