React-native: Unable to resolve module `./Libraries/Components/Pressable/Pressable` from `node_modules/react-native/index.js` after downgrade from 0.63.2 to 0.62.2

Created on 6 Sep 2020  路  5Comments  路  Source: facebook/react-native

I am trying to downgrade from RN 0.63.2 to RN 0.62.2 it gives me following error

error: Error: Unable to resolve module `./Libraries/Components/Pressable/Pressable` from `node_modules/react-native/index.js`:

None of these files exist:
  * node_modules/react-native/Libraries/Components/Pressable/Pressable(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
  * node_modules/react-native/Libraries/Components/Pressable/Pressable/index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
    at ModuleResolver.resolveDependency (/Project/metro/src/node-haste/DependencyGraph/ModuleResolution.js:163:15)

I have one library installed in my project that is react-native-html-to-pdf

Now, I am unable to make PDF file in android API LEVEL 29. But works with API LEVEL 28
So, according to this thread, I have to downgrade RN from 0.63.2 to 0.62.2

Attention Environment Info 馃摝Bundler

Most helpful comment

If you're using the Pressable component anywhere in your code, you should change it to TouchableOpacity.
Pressable is only available from 0.63 onwards

after I execute this command. npx react-native start --reset-cache pressable error is gone.

All 5 comments

:warning: Missing Environment Information
:information_source: Your issue may be missing information about your development environment. You can obtain the missing information by running react-native info in a console.

I think you want to try npx react-native start --reset-cache

@exneval thanks, it works.
But still I am not able to make pdf using html-to-pdf library

If you're using the Pressable component anywhere in your code, you should change it to TouchableOpacity.
Pressable is only available from 0.63 onwards

If you're using the Pressable component anywhere in your code, you should change it to TouchableOpacity.
Pressable is only available from 0.63 onwards

after I execute this command. npx react-native start --reset-cache pressable error is gone.

Was this page helpful?
0 / 5 - 0 ratings