ant-design / ant-design-mobile-rn

Ant Design for React Native
https://rn.mobile.ant.design/
MIT License
3.04k stars 612 forks source link

Unable to resolve module @react-native-community/cameraroll #1172

Closed sahilpaudel-pe closed 3 years ago

sahilpaudel-pe commented 3 years ago

I had to add @react-native-community/cameraroll @react-native-community/slider
react-native-pager-view and so on manually

Full error

Failed building JavaScript bundle.
Unable to resolve module @react-native-community/cameraroll from /Users/sahilpaudel/Documents/react/VaccinationTarik/node_modules/@ant-design/react-native/lib/image-picker/CameraRollPicker.js: @react-native-community/cameraroll could not be found within the project.

If you are sure the module exists, try these steps:
 1. Clear watchman watches: watchman watch-del-all
 2. Delete node_modules and run yarn install
 3. Reset Metro's cache: yarn start --reset-cache
 4. Remove the cache: rm -rf /tmp/metro-*
  25 | var _inherits3 = _interopRequireDefault(_inherits2);
  26 |
> 27 | var _cameraroll = require("@react-native-community/cameraroll");
     |                            ^
  28 |
  29 | var _cameraroll2 = _interopRequireDefault(_cameraroll);
  30 |
aidan-doherty commented 1 year ago

Why has this been closed? Should these not be included as dependencies to install automatically or better be its own installable component like for example "@ant-design/image-picker". So users can exclude packages they do not require.

Only solution at the moment is to install the dependencies manually and live with it or patch the package to exclude them which does not seem ideal.