react-navigation-bottom-sheet icon indicating copy to clipboard operation
react-navigation-bottom-sheet copied to clipboard

Can't run example app

Open aldebout opened this issue 1 year ago • 0 comments

I'm trying to reproduce a bug that I think is linked to this library.

My app is pretty different from the basic setup for this lib (using expo-router, development build...) so I thought I could just clone the repo and the the /example folder as a starting point.

However I'm running into issues:

  1. It looks like you're trying to use TypeScript but don't have the required dependencies installed. Would you like to install typescript, @types/react-native? … yes
  2. ExpoMetroConfig.loadAsync is not a function -> removed expo-cli from devDependencies
  3. Unable to resolve "react" from "src/App.tsx" when launching in expo go, with the following message in-app:
Metro has encountered an error: While trying to resolve module `react` from file `XXX/react-navigation-bottom-sheet/example/src/App.tsx`, the package `XXX/react-navigation-bottom-sheet/example/node_modules/@types/react/package.json` was successfully found. However, this package itself specifies a `main` module field that could not be resolved (`XXX/react-navigation-bottom-sheet/example/node_modules/@types/react/index`. Indeed, none of these files exist:

  * XXX/react-navigation-bottom-sheet/example/node_modules/@types/react/index(.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx)
  * XXX/react-navigation-bottom-sheet/example/node_modules/@types/react/index/index(.ios.js|.native.js|.js|.ios.jsx|.native.jsx|.jsx|.ios.json|.native.json|.json|.ios.ts|.native.ts|.ts|.ios.tsx|.native.tsx|.tsx): XXX/react-navigation-bottom-sheet/example/node_modules/metro/src/node-haste/DependencyGraph.js (243:17)

  241 |         }
  242 |         if (error instanceof InvalidPackageError) {
> 243 |           throw new PackageResolutionError({
      |                 ^
  244 |             packageError: error,
  245 |             originModulePath: from,
  246 |             targetModuleName: to,

I've given up after this third one, but it would be really nice if the example app was easier to run, I could try to reproduce/report the bug I'm actually worried about :) (native crash when trying to open a react-native-modal inside of a navigation sheet).

aldebout avatar Sep 11 '24 07:09 aldebout