skip to Main Content

Just finished updating from RN 0.69.8 to RN 0.71.3 and I’m having some issues. RN Gesture handler is perfectly installed and in my node-modules file, I’ve followed all update instructions to the tee, yet I still get

Error: Unable to resolve module react-native-gesture-handler from /Users/ethan/LayrApp/index.tsx: react-native-gesture-handler could not be found within the project or in these directories:
  node_modules
  ../../node_modules
   6 | import App from './App';
   7 | import { name as appName } from './app.json';
>  8 | import 'react-native-gesture-handler';
     |         ^
   9 |
  10 | AppRegistry.registerComponent(appName, () => App);

Coming from the index.tsx file. I’m pretty lost at this point, tried rebuilding the packages from scratch, going through all the pods and checking if everything was in order, etc.

Any ideas? Currently glued to my laptop trying to resolve this.

BTW: Trying to comment out the rn gesture handler and running just yields these results:

Error: Unable to resolve module ./app.json from /Users/ethan/Downloads/LayrApp/index.tsx:

None of these files exist:
  * app.json(.native|.ios.jsx|.native.jsx|.jsx|.ios.js|.native.js|.js|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
  * app.json/index(.native|.ios.jsx|.native.jsx|.jsx|.ios.js|.native.js|.js|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
   5 | import { AppRegistry } from 'react-native';
   6 | import App from './App';
>  7 | import { name as appName } from './app.json';
     |                                  ^
   8 | // import 'react-native-gesture-handler';
   9 |
  10 | AppRegistry.registerComponent(appName, () => App);

Looks like I’m in a little error loop 🙁

Lmk if you guys have any ideas, and thank’s in advance!

2

Answers


  1. same issues on my side… from 0.69.8 to RN 0.71.7

    Login or Signup to reply.
  2. You need to remove "resolver" object from "metro.config.js" file. Try this solution https://github.com/facebook/react-native/issues/36676#issuecomment-1495432504

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search