React-native-vector-icons: [v7.0.0] Error: Unable to resolve module `./toolbar-android` from `node_modules/react-native-vector-icons/dist/lib/create-icon-set.js`

Created on 6 Jul 2020  路  21Comments  路  Source: oblador/react-native-vector-icons

After upgrading to the new version 7.0.0, running iOS failed at:

Error: Unable to resolve module `./toolbar-android` from `node_modules/react-native-vector-icons/dist/lib/create-icon-set.js`

I'm trying to clean with

watchman watch-del-all
rm -rf node_modules/
rm -rf ios/Pods/
npm start --reset-cache

Installing the @react-native-community/toolbar-android package not solves the error yet.

Most helpful comment

Use npm start -- --reset-cache instead of npm start --reset-cache

The double dash in the middle tells NPM to pass on the cli args to the command executed. This solved the issue for me.

All 21 comments

Facing same issue

Facing the same issue.

I'm seeing the same issue with v6.7.0

Same on 7.0.0, but "fixed" after a downgrade to 6.7.0

yarn add @react-native-community/toolbar-android and pod install worked for me

same issue on Android

Are you sure you had version 7.0.0 installed? I had the same issue with version 6.7.0, which had the dependency in package.json.
The dependency was removed in version 7.0.0, it builds in Android & iOS.

Same here ...
Running on iOS .

th瓢 vi峄噉 rn n脿o d霉ng vector icon ch瓢a l锚n 7.0 ch岷縯 h岷縯 a oi

I had the same problem, I reinstalled the module 'react-native-vector-icon' and the error was gone.

Use npm start -- --reset-cache instead of npm start --reset-cache

The double dash in the middle tells NPM to pass on the cli args to the command executed. This solved the issue for me.

@jdegger Thank you!
Resolved: use npm start -- --reset-cache instead of npm start --reset-cache

That doesn't resolve it though.

This is actually bug in v 6.7.0,
me after use V 7.0.0 is running normaly. But you must have a little bit effort to do this,
rm -rf node_modules
remove v 6.7.0 with "react-native-vector-icons": "^7.0.0" in package.json
npm i
react-native start --reset-cache

I solved the isssue with a combination of steps from the above answers, here is my approach:

  1. delete node_modules

rm -rf node_modules/

  1. remove version 6.7.0 of react-native-vector-icons
    in the package json changes to version 7.0.0 like this:

"react-native-vector-icons": "^7.0.0"

  1. install node_modules

npm i

  1. yarn add @react-native-community/toolbar-android

  2. Run like this npm start:

npm start -- --reset-cache

I tested my solution even until version "^7.0.0" and the following command will help you:

yarn add @react-native-community/toolbar-android

see complete solution on Stack Overflow

Same on 7.0.0, but "fixed" after a downgrade to 6.7.0

@moahmed123 , do not downgrade, use this solution. using the latest version is inevitable.

For me, running these works (i'm using iOS though):

  1. npm install --save @react-native-community/toolbar-android
  2. npm start -- --reset-cache

Note: my "react-native-vector-icons": "^7.0.0"

if you guys using expo, try updating the expo-cli. that worked for me

Was this page helpful?
0 / 5 - 0 ratings