avishayil / react-native-user-avatar

Avatar Component For React Native
MIT License
206 stars 57 forks source link

Why does it require me to install a lot of extra packages #97

Closed AhmedSarhan closed 2 years ago

AhmedSarhan commented 2 years ago

when I installed the package on my expo application, once imported the application broke coz I need to install url package then broke again coz I need to install http package any my guess this won't be the end of it

this is the error I keep getting

http could not be found within the project or in these directories:
  node_modules

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-*
   8 | var parse_url = require('url').parse;
   9 | var resolve_url = require('url').resolve;
> 10 | var http = require('http');
     |                     ^
  11 | var https = require('https');
  12 | var zlib = require('zlib');
  13 | var stream = require('stream');
avishayil commented 2 years ago

Hi @AhmedSarhan , as far as i'm concerned the http module is built-in to nodejs: https://nodejs.org/api/http.html

I guess that you have some other kind of dependencies issues in your project.

AhmedSarhan commented 2 years ago

I did my search and turns out such packages don't work with expo but rather with just react-native apps other wise no it's not a project issue other deps are working correct