Can't install in an expo snack: Invalid module ../assets/images/LeftArrow.png
Opened this issue · 0 comments
matthieugicquel commented
Reproduction: https://snack.expo.dev/@matthieugc/blissful-blue-marshmallows
Failed to resolve dependency '@bam.tech/react-native-screen-sizer@0.3.0' (Invalid module ../assets/images/LeftArrow.png - Module not found: Error: Can't resolve '../assets/images/LeftArrow.png' in '/tmp/snackager/snackager/buildStatus/1/@bam.tech~react-native-screen-sizer@0.3.0-ios,android,web/package/lib/module')
It seems like snack uses the "module" field in package.json (pointing to ./lib/module
) as an entrypoint (not the "react-native" field pointing to (./src
), and since there's one more folder level, the assets path is invalid (should be "../../" instead of "../")