zulip / zulip-mobile

Zulip mobile apps for Android and iOS.
https://zulip.com/apps/
Apache License 2.0
1.29k stars 651 forks source link

Missing dependency @react-native-community/toolbar-android #4231

Open aryanshridhar opened 4 years ago

aryanshridhar commented 4 years ago

Hi all , Looks like code>@react-native-community/toolbar-android</code is missing in the dependencies listed in package.json .

When executed react-native start after building by using npx react-native run-android , It throws an error as


error: bundling failed: Error: Unable to resolve module `@react-native-community/toolbar-android` from `node_modules/react-native-vector-icons/lib/toolbar-android.js`: @react-native-community/toolbar-android 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: rm -rf node_modules and run yarn install
 3. Reset Metro's cache: yarn start --reset-cache
 4. Remove the cache: rm -rf /tmp/metro-*
    at ModuleResolver.resolveDependency (/home/aryanshridhar/Desktop/zulip-mobile/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:186:15)
    at ResolutionRequest.resolveDependency (/home/aryanshridhar/Desktop/zulip-mobile/node_modules/metro/src/node-haste/DependencyGraph/ResolutionRequest.js:52:18)
    at DependencyGraph.resolveDependency (/home/aryanshridhar/Desktop/zulip-mobile/node_modules/metro/src/node-haste/DependencyGraph.js:282:16)
    at Object.resolve (/home/aryanshridhar/Desktop/zulip-mobile/node_modules/metro/src/lib/transformHelpers.js:267:42)
    at /home/aryanshridhar/Desktop/zulip-mobile/node_modules/metro/src/DeltaBundler/traverseDependencies.js:426:31
    at Array.map ()
    at resolveDependencies (/home/aryanshridhar/Desktop/zulip-mobile/node_modules/metro/src/DeltaBundler/traverseDependencies.js:423:18)
    at /home/aryanshridhar/Desktop/zulip-mobile/node_modules/metro/src/DeltaBundler/traverseDependencies.js:275:33
    at Generator.next ()
    at asyncGeneratorStep (/home/aryanshridhar/Desktop/zulip-mobile/node_modules/metro/src/DeltaBundler/traverseDependencies.js:87:24)

P.S : It works totally fine after installing code>@react-native-community/toolbar-android</code . Let me know if you want a Pr for it !

chrisbobbe commented 4 years ago

Interesting! From some searching and reading documentation, it looks like this is something we should do if we want to use something called ToolbarAndroid: https://github.com/oblador/react-native-vector-icons/blob/v7.1.0/README.md#toolbarandroid

Are you thinking of starting to use that?